mirror of
https://github.com/anatolykopyl/vue-highlights.git
synced 2026-03-26 04:45:33 +00:00
updated README.md
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
Easy @mention, #hashtag and URL highlight for Vue 2.x
|
Easy @mention, #hashtag and URL highlight for Vue 2.x
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
You can install via npm or yarn:
|
You can install via npm or yarn:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
@@ -48,6 +49,7 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
```
|
```
|
||||||
|
|
||||||
As you can see, the component accepts some props:
|
As you can see, the component accepts some props:
|
||||||
|
|
||||||
| Prop | Type | Description |
|
| Prop | Type | Description |
|
||||||
|
|||||||
23
tests/unit/basic.spec.js
Normal file
23
tests/unit/basic.spec.js
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
import { mount, shallowMount } from '@vue/test-utils'
|
||||||
|
import App from '../../docs-src/App.vue'
|
||||||
|
import Docs from '../../docs-src/Docs.vue'
|
||||||
|
|
||||||
|
describe('App.vue', () => {
|
||||||
|
it('renders Home page', () => {
|
||||||
|
const msg = 'vue-highlights'
|
||||||
|
const wrapper = mount(App, {
|
||||||
|
stubs: ['router-link', 'router-view']
|
||||||
|
})
|
||||||
|
expect(wrapper.text()).toMatch(msg)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
describe('Docs.vue', () => {
|
||||||
|
it('renders Docs page', () => {
|
||||||
|
const msg = 'Documentation'
|
||||||
|
const wrapper = shallowMount(Docs, {
|
||||||
|
stubs: ['router-link']
|
||||||
|
})
|
||||||
|
expect(wrapper.text()).toMatch(msg)
|
||||||
|
})
|
||||||
|
})
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
import { shallowMount } from '@vue/test-utils'
|
|
||||||
import HelloWorld from '@/components/HelloWorld.vue'
|
|
||||||
|
|
||||||
describe('HelloWorld.vue', () => {
|
|
||||||
it('renders props.msg when passed', () => {
|
|
||||||
const msg = 'new message'
|
|
||||||
const wrapper = shallowMount(HelloWorld, {
|
|
||||||
propsData: { msg }
|
|
||||||
})
|
|
||||||
expect(wrapper.text()).toMatch(msg)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
Reference in New Issue
Block a user