Skip to content
This repository has been archived by the owner on Sep 8, 2023. It is now read-only.

Commit

Permalink
Fix test with additional container
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliusknorr committed Aug 12, 2022
1 parent 33f7e57 commit 542e56b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ import { RichText } from '@juliushaertl/vue-richtext'
- username: `{ component: User, props: { username: 'Jane Doe' }`
- Renders: `The <strong>file</strong> <i>'MyDocument'</i> was added by <User>Jane Doe</User>`


## Reference rendering

## Documentation

A full example is shown in the [documentation](https://juliushaertl.github.io/vue-richtext/)
6 changes: 4 additions & 2 deletions tests/richtext.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,10 @@ describe('Foo', () => {
})

expect(wrapper.text()).toEqual('Testwith a link to https://example.com \n go visit it')
expect(wrapper.html()).toEqual(`<div class="rich-text--wrapper">Testwith a link to <a href="https://example.com" rel="noopener noreferrer" target="_blank" class="rich-text--external-link">https://example.com</a>
go visit it</div>`)
expect(wrapper.html()).toEqual(`<div class="rich-text--wrapper">
<div>Testwith a link to <a href="https://example.com" rel="noopener noreferrer" target="_blank" class="rich-text--external-link">https://example.com</a>
go visit it</div>
</div>`)

expect(wrapper.find('a').attributes('href')).toEqual('https://example.com')
})
Expand Down

0 comments on commit 542e56b

Please sign in to comment.