Skip to content

Docs: Remove Chai references from examples #439

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Feb 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/en/api/createLocalVue.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Use it with `options.localVue`:

```js
import { createLocalVue, shallow } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'

const localVue = createLocalVue()
Expand Down
6 changes: 0 additions & 6 deletions docs/en/api/mount.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Creates a [`Wrapper`](wrapper/README.md) that contains the mounted and rendered

```js
import { mount } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'

describe('Foo', () => {
Expand All @@ -34,7 +33,6 @@ describe('Foo', () => {

```js
import { mount } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'

describe('Foo', () => {
Expand All @@ -53,7 +51,6 @@ describe('Foo', () => {

```js
import { mount } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'

describe('Foo', () => {
Expand All @@ -69,7 +66,6 @@ describe('Foo', () => {

```js
import { mount } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'
import Bar from './Bar.vue'
import FooBar from './FooBar.vue'
Expand All @@ -92,7 +88,6 @@ describe('Foo', () => {

```js
import { mount } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'

describe('Foo', () => {
Expand All @@ -112,7 +107,6 @@ describe('Foo', () => {

```js
import { mount } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'
import Bar from './Bar.vue'
import Faz from './Faz.vue'
Expand Down
6 changes: 1 addition & 5 deletions docs/en/api/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ Provide an object of slot contents to the component. The key corresponds to the
Example:

```js
import { expect } from 'chai'
import Foo from './Foo.vue'
import Bar from './Bar.vue'

Expand Down Expand Up @@ -102,8 +101,6 @@ Add additional properties to the instance. Useful for mocking global injections.
Example:

```js
import { expect } from 'chai'

const $route = { path: 'http://www.example-path.com' }
const wrapper = shallow(Component, {
mocks: {
Expand All @@ -124,7 +121,6 @@ Example:
```js
import { createLocalVue, mount } from '@vue/test-utils'
import VueRouter from 'vue-router'
import { expect } from 'chai'
import Foo from './Foo.vue'

const localVue = createLocalVue()
Expand Down Expand Up @@ -197,5 +193,5 @@ const options = {
}
}
const wrapper = mount(Component, options)
expect(wrapper.text()).to.equal('aBC')
expect(wrapper.text()).toBe('aBC')
```
4 changes: 0 additions & 4 deletions docs/en/api/renderToString.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ Renders a component to HTML.

```js
import { renderToString } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'

describe('Foo', () => {
Expand All @@ -44,7 +43,6 @@ describe('Foo', () => {

```js
import { renderToString } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'

describe('Foo', () => {
Expand All @@ -63,7 +61,6 @@ describe('Foo', () => {

```js
import { renderToString } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'
import Bar from './Bar.vue'
import FooBar from './FooBar.vue'
Expand All @@ -86,7 +83,6 @@ describe('Foo', () => {

```js
import { renderToString } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'

describe('Foo', () => {
Expand Down
1 change: 0 additions & 1 deletion docs/en/api/selectors.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export default {

```js
import { shallow } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'

const wrapper = shallow(Foo)
Expand Down
5 changes: 0 additions & 5 deletions docs/en/api/shallow.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ Like [`mount`](mount.md), it creates a [`Wrapper`](wrapper/README.md) that conta

```js
import { shallow } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'

describe('Foo', () => {
Expand All @@ -43,7 +42,6 @@ describe('Foo', () => {

```js
import { shallow } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'

describe('Foo', () => {
Expand All @@ -62,7 +60,6 @@ describe('Foo', () => {

```js
import { shallow } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'

describe('Foo', () => {
Expand All @@ -79,7 +76,6 @@ describe('Foo', () => {

```js
import { shallow } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'
import Bar from './Bar.vue'
import FooBar from './FooBar.vue'
Expand All @@ -102,7 +98,6 @@ describe('Foo', () => {

```js
import { shallow } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'

describe('Foo', () => {
Expand Down
1 change: 0 additions & 1 deletion docs/en/api/wrapper-array/at.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Returns `Wrapper` at `index` passed. Uses zero based numbering (i.e. first item

```js
import { shallow } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'

const wrapper = shallow(Foo)
Expand Down
1 change: 0 additions & 1 deletion docs/en/api/wrapper-array/contains.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Use any valid [selector](../selectors.md).

```js
import { shallow } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'
import Bar from './Bar.vue'

Expand Down
1 change: 0 additions & 1 deletion docs/en/api/wrapper-array/destroy.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Destroys each Vue `Wrapper` in `WrapperArray`.

```js
import { mount } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'

const wrapper = mount(Foo)
Expand Down
1 change: 0 additions & 1 deletion docs/en/api/wrapper-array/is.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Assert every `Wrapper` in `WrapperArray` DOM node or `vm` matches [selector](../

```js
import { mount } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'

const wrapper = mount(Foo)
Expand Down
1 change: 0 additions & 1 deletion docs/en/api/wrapper-array/isEmpty.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Assert every `Wrapper` in `WrapperArray` does not contain child node.

```js
import { mount } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'

const wrapper = mount(Foo)
Expand Down
1 change: 0 additions & 1 deletion docs/en/api/wrapper-array/isVisible.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ This can be used to assert that a component is hidden by `v-show`.

```js
import { mount } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'

const wrapper = mount(Foo)
Expand Down
1 change: 0 additions & 1 deletion docs/en/api/wrapper-array/isVueInstance.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Assert every `Wrapper` in `WrapperArray` is Vue instance.

```js
import { mount } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'
import Bar from './Bar.vue'

Expand Down
1 change: 0 additions & 1 deletion docs/en/api/wrapper-array/setData.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Sets `Wrapper` `vm` data and forces update on each `Wrapper` in `WrapperArray`.

```js
import { mount } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'
import Bar from './Bar.vue'

Expand Down
1 change: 0 additions & 1 deletion docs/en/api/wrapper-array/setMethods.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Sets `Wrapper` `vm` methods and forces update on each `Wrapper` in `WrapperArray

```js
import { mount } from '@vue/test-utils'
import { expect } from 'chai'
import sinon from 'sinon'
import Foo from './Foo.vue'
import Bar from './Bar.vue'
Expand Down
1 change: 0 additions & 1 deletion docs/en/api/wrapper-array/setProps.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Sets `Wrapper` `vm` props and forces update on each `Wrapper` in `WrapperArray`.

```js
import { mount } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'
import Bar from './Bar.vue'

Expand Down
1 change: 0 additions & 1 deletion docs/en/api/wrapper-array/trigger.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Triggers an event on every `Wrapper` in the `WrapperArray` DOM node.

```js
import { mount } from '@vue/test-utils'
import { expect } from 'chai'
import sinon from 'sinon'
import Foo from './Foo.vue'

Expand Down
1 change: 0 additions & 1 deletion docs/en/api/wrapper-array/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ If called on a Vue component wrapper array, it will force each Vue component to

```js
import { mount } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'

const wrapper = mount(Foo)
Expand Down
1 change: 0 additions & 1 deletion docs/en/api/wrapper/attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Returns `Wrapper` DOM node attribute object.

```js
import { mount } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'

const wrapper = mount(Foo)
Expand Down
1 change: 0 additions & 1 deletion docs/en/api/wrapper/classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Returns Array of class names.

```js
import { mount } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'

const wrapper = mount(Foo)
Expand Down
1 change: 0 additions & 1 deletion docs/en/api/wrapper/contains.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Assert `Wrapper` contains an element or component matching [selector](../selecto

```js
import { mount } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'
import Bar from './Bar.vue'

Expand Down
3 changes: 1 addition & 2 deletions docs/en/api/wrapper/destroy.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Destroys a Vue component instance.

```js
import { mount } from '@vue/test-utils'
import { expect } from 'chai'
import sinon from 'sinon'

const spy = sinon.stub()
Expand All @@ -16,5 +15,5 @@ mount({
spy()
}
}).destroy()
expect(spy.calledOnce).to.equal(true)
expect(spy.calledOnce).toBe(true)
```
1 change: 0 additions & 1 deletion docs/en/api/wrapper/emitted.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Return an object containing custom events emitted by the `Wrapper` `vm`.

```js
import { mount } from '@vue/test-utils'
import { expect } from 'chai'

const wrapper = mount(Component)

Expand Down
1 change: 0 additions & 1 deletion docs/en/api/wrapper/emittedByOrder.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Return an Array containing custom events emitted by the `Wrapper` `vm`.

```js
import { mount } from '@vue/test-utils'
import { expect } from 'chai'

const wrapper = mount(Component)

Expand Down
1 change: 0 additions & 1 deletion docs/en/api/wrapper/exists.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Returns false if called on an empty `Wrapper` or `WrapperArray`.

```js
import { mount } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'

const wrapper = mount(Foo)
Expand Down
1 change: 0 additions & 1 deletion docs/en/api/wrapper/find.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Use any valid [selector](../selectors.md).

```js
import { mount } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'
import Bar from './Bar.vue'

Expand Down
1 change: 0 additions & 1 deletion docs/en/api/wrapper/findAll.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Use any valid [selector](../selectors.md).

```js
import { mount } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'
import Bar from './Bar.vue'

Expand Down
1 change: 0 additions & 1 deletion docs/en/api/wrapper/html.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Returns HTML of `Wrapper` DOM node as a string.

```js
import { mount } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'

const wrapper = mount(Foo)
Expand Down
1 change: 0 additions & 1 deletion docs/en/api/wrapper/is.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Assert `Wrapper` DOM node or `vm` matches [selector](../selectors.md).

```js
import { mount } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'

const wrapper = mount(Foo)
Expand Down
1 change: 0 additions & 1 deletion docs/en/api/wrapper/isEmpty.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Assert `Wrapper` does not contain child node.

```js
import { mount } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'

const wrapper = mount(Foo)
Expand Down
1 change: 0 additions & 1 deletion docs/en/api/wrapper/isVisible.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ This can be used to assert that a component is hidden by `v-show`.

```js
import { mount } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'

const wrapper = mount(Foo)
Expand Down
1 change: 0 additions & 1 deletion docs/en/api/wrapper/isVueInstance.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Assert `Wrapper` is Vue instance.

```js
import { mount } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'

const wrapper = mount(Foo)
Expand Down
1 change: 0 additions & 1 deletion docs/en/api/wrapper/name.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Returns component name if `Wrapper` contains a Vue instance, or the tag name of

```js
import { mount } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'

const wrapper = mount(Foo)
Expand Down
1 change: 0 additions & 1 deletion docs/en/api/wrapper/props.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Return `Wrapper` `vm` props object.

```js
import { mount } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'

const wrapper = mount(Foo, {
Expand Down
Loading