Skip to content

Commit 393b842

Browse files
authored
Merge branch 'dev' into dev
2 parents 57aab16 + ad602fc commit 393b842

File tree

405 files changed

+7471
-7778
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

405 files changed

+7471
-7778
lines changed

.circleci/config.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@ version: 2
33
defaults: &defaults
44
working_directory: ~/repo/vue-test-utils
55
docker:
6-
- image: circleci/node:6.13.0-stretch-browsers
6+
- image: vuejs/ci
77
restore_node_modules: &restore_node_modules
88
restore_cache:
99
name: Restore node_modules cache
1010
keys:
1111
- v1-dependencies-{{ .Branch }}-{{ checksum "yarn.lock" }}
12-
- v1-dependencies-{{ .Branch }}-
13-
- v1-dependencies-
1412
jobs:
1513
install:
1614
<<: *defaults

.eslintrc

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
"rules": {
1616
"no-debugger": 2,
1717
"no-proto": 0,
18-
"max-len": 2
18+
"space-before-function-paren": 0,
19+
"object-curly-spacing": 0,
20+
"indent": 0
1921
}
2022
}

.github/CONTRIBUTING.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Hi! I’m really excited that you are interested in contributing to Vue Test Uti
2525
- Make sure `npm test` passes. (see [development setup](#development-setup))
2626

2727
- If adding new feature:
28+
2829
- Add accompanying test case.
2930
- Provide convincing reason to add this feature. Ideally you should open a suggestion issue first and have it greenlighted before working on it.
3031

@@ -37,11 +38,11 @@ Hi! I’m really excited that you are interested in contributing to Vue Test Uti
3738

3839
You will need [Node.js](http://nodejs.org) **version 6+**
3940

40-
Vue Test Utils is a monorepo. It contains a root package.json for running scripts across the project. The code is inside separate packages in the `packages` directory. The project uses [lerna](https://lernajs.io/) to manage the workspaces.
41+
Vue Test Utils is a monorepo. It contains a root package.json for running scripts across the project. The code is inside separate packages in the `packages` directory. The project uses [lerna](https://lerna.js.org/) to manage the workspaces.
4142

4243
After cloning the repo, run:
4344

44-
``` bash
45+
```bash
4546
$ yarn
4647
```
4748

@@ -50,9 +51,10 @@ Or with npm:
5051
```bash
5152
npm i && npm run bootstrap
5253
```
54+
5355
### Commonly used NPM scripts
5456

55-
``` bash
57+
```bash
5658
# run unit tests with mocha-webpack
5759
$ npm run test:unit
5860

@@ -90,4 +92,4 @@ The default test script will do the following: lint with ESLint -> type check wi
9092

9193
- **`types`**: contains TypeScript type definitions
9294

93-
- **`test`**: type definitions tests
95+
- **`test`**: type definitions tests

.prettierignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package.json
2+
package-lock.json
3+
**/dist/**
4+
CHANGELOG.md
5+
lerna.json

.prettierrc.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"semi": false,
3+
"singleQuote": true
4+
}

CHANGELOG.md

+25
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,31 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
<a name="1.0.0-beta.29"></a>
7+
# [1.0.0-beta.29](https://github.com/vuejs/vue-test-utils/compare/v1.0.0-beta.28...v1.0.0-beta.29) (2019-02-02)
8+
9+
10+
### Bug Fixes
11+
12+
* handle errors in destroy ([#1106](https://github.com/vuejs/vue-test-utils/issues/1106)) ([efab983](https://github.com/vuejs/vue-test-utils/commit/efab983))
13+
* handle options applied by mixins ([#1101](https://github.com/vuejs/vue-test-utils/issues/1101)) ([d2f26e8](https://github.com/vuejs/vue-test-utils/commit/d2f26e8))
14+
* use Vue async option for sync mode ([#1062](https://github.com/vuejs/vue-test-utils/issues/1062)) ([4c65dbd](https://github.com/vuejs/vue-test-utils/commit/4c65dbd))
15+
16+
17+
### Code Refactoring
18+
19+
* remove deprecated methods ([#1109](https://github.com/vuejs/vue-test-utils/issues/1109)) ([1d1d003](https://github.com/vuejs/vue-test-utils/commit/1d1d003))
20+
* remove polyfills ([#1110](https://github.com/vuejs/vue-test-utils/issues/1110)) ([ade4398](https://github.com/vuejs/vue-test-utils/commit/ade4398))
21+
22+
23+
### BREAKING CHANGES
24+
25+
* Remove polyfills from library
26+
* hasStyle, hasAttribute, hasClass, hasProp, visible, and setComputed removed
27+
28+
29+
30+
631
<a name="1.0.0-beta.28"></a>
732
# [1.0.0-beta.28](https://github.com/vuejs/vue-test-utils/compare/v1.0.0-beta.27...v1.0.0-beta.28) (2018-12-29)
833

README.md

+3-9
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
This repository provides the following two packages.
66
They are currently in beta.
77

8-
* [Vue Test Utils](./packages/test-utils)
9-
* [Vue Server Test Utils](./packages/server-test-utils)
8+
- [Vue Test Utils](./packages/test-utils)
9+
- [Vue Server Test Utils](./packages/server-test-utils)
1010

1111
You can install these packages by the following command.
1212

@@ -16,6 +16,7 @@ npm install --save-dev @vue/server-test-utils
1616
```
1717

1818
## Peer Dependencies
19+
1920
You need to install `vue-template-compiler` which is used to compile components. It should be the same version as the version of Vue you are using.
2021

2122
```
@@ -26,13 +27,6 @@ npm install --save-dev vue-template-compiler
2627

2728
Refer to the [documentation](https://vue-test-utils.vuejs.org/)
2829

29-
## Examples
30-
31-
- [example with Jest](https://github.com/vuejs/vue-test-utils-jest-example)
32-
- [example with Mocha](https://github.com/vuejs/vue-test-utils-mocha-webpack-example)
33-
- [example with tape](https://github.com/eddyerburgh/vue-test-utils-tape-example)
34-
- [example with AVA](https://github.com/eddyerburgh/vue-test-utils-ava-example)
35-
3630
## Questions
3731

3832
For questions and support please use the [Discord chat room](https://vue-land.js.org/) or [the official forum](http://forum.vuejs.org). The issue list of this repo is **exclusively** for bug reports and feature requests.

docs/.vuepress/_redirects

-33
This file was deleted.

docs/.vuepress/config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ module.exports = {
128128
'/ru/api/options',
129129
'/ru/api/components/'
130130
]
131-
},
131+
}
132132
}
133133
},
134134
markdown: {

docs/.vuepress/public/_redirects

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/en/* /:splat
2+
3+
/api/mount /api/#mount
4+
/api/shallowmount /api/#shallowmount
5+
/api/createlocalvue /api/#createlocalvue
6+
/api/config /api/#config
7+
8+
/api/wrapper/isvisible /api/wrapper/#isvisible
9+
/api/wrapper/emitted /api/wrapper/#emitted
10+
/api/wrapper/html /api/wrapper/#html
11+
/api/wrapper/name /api/wrapper/#name
12+
/api/wrapper/setprops /api/wrapper/#setprops
13+
/api/wrapper/attributes /api/wrapper/#attributes
14+
/api/wrapper/emittedbyorder /api/wrapper/#emittedbyorder
15+
/api/wrapper/is /api/wrapper/#is
16+
/api/wrapper/props /api/wrapper/#props
17+
/api/wrapper/setselected /api/wrapper/#setselected
18+
/api/wrapper/classes /api/wrapper/#classes
19+
/api/wrapper/exists /api/wrapper/#exists
20+
/api/wrapper/isempty /api/wrapper/#isempty
21+
/api/wrapper/setchecked /api/wrapper/#setchecked
22+
/api/wrapper/setvalue /api/wrapper/#setvalue
23+
/api/wrapper/contains /api/wrapper/#contains
24+
/api/wrapper/find /api/wrapper/#find
25+
/api/wrapper/isvisible /api/wrapper/#isvisible
26+
/api/wrapper/setdata /api/wrapper/#setdata
27+
/api/wrapper/text /api/wrapper/#text
28+
/api/wrapper/destroy /api/wrapper/#destroy
29+
/api/wrapper/findall /api/wrapper/#findall
30+
/api/wrapper/isvueinstance /api/wrapper/#isvueinstance
31+
/api/wrapper/setmethods /api/wrapper/#setmethods
32+
/api/wrapper/trigger /api/wrapper/#trigger
33+
34+
/api/wrapper-array/destroy /api/wrapper-array/#destroy
35+
/api/wrapper-array/isempty /api/wrapper-array/#isempty
36+
/api/wrapper-array/setchecked /api/wrapper-array/#setchecked
37+
/api/wrapper-array/setprops /api/wrapper-array/#setprops
38+
/api/wrapper-array/at /api/wrapper-array/#at
39+
/api/wrapper-array/filter /api/wrapper-array/#filter
40+
/api/wrapper-array/isvisible /api/wrapper-array/#isvisible
41+
/api/wrapper-array/setdata /api/wrapper-array/#setdata
42+
/api/wrapper-array/setvalue /api/wrapper-array/#setvalue
43+
/api/wrapper-array/contains /api/wrapper-array/#contains
44+
/api/wrapper-array/is /api/wrapper-array/#is
45+
/api/wrapper-array/isvueinstance /api/wrapper-array/#isvueinstance
46+
/api/wrapper-array/setmethods /api/wrapper-array/#setmethods
47+
/api/wrapper-array/trigger /api/wrapper-array/#trigger
48+

docs/README.md

+67-67
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@
22

33
Vue Test Utils is the official unit testing utility library for Vue.js.
44

5-
* [Guides](./guides/)
6-
* [Getting Started](./guides/getting-started.md)
7-
* [Common Tips](guides/common-tips.md)
8-
* [Mouse, Key and other DOM Events](guides/dom-events.md)
9-
* [Choosing a test runner](guides/choosing-a-test-runner.md)
10-
* [Testing Single-File Components with Jest](guides/testing-single-file-components-with-jest.md)
11-
* [Testing Single-File Components with Mocha + webpack](guides/testing-single-file-components-with-mocha-webpack.md)
12-
* [Testing Single-File Components with Karma](guides/testing-single-file-components-with-karma.md)
13-
* [Testing Asynchronous Behavior](guides/testing-async-components.md)
14-
* [Using with TypeScript](guides/using-with-typescript.md)
15-
* [Using with Vue Router](guides/using-with-vue-router.md)
16-
* [Using with Vuex](guides/using-with-vuex.md)
17-
* [API](api/)
18-
* [mount](api/mount.md)
19-
* [shallowMount](api/shallowMount.md)
20-
* [render](api/render.md)
21-
* [renderToString](api/renderToString.md)
22-
* [Mounting Options](api/options.md)
5+
- [Guides](./guides/)
6+
- [Getting Started](./guides/getting-started.md)
7+
- [Common Tips](guides/common-tips.md)
8+
- [Mouse, Key and other DOM Events](guides/dom-events.md)
9+
- [Choosing a test runner](guides/choosing-a-test-runner.md)
10+
- [Testing Single-File Components with Jest](guides/testing-single-file-components-with-jest.md)
11+
- [Testing Single-File Components with Mocha + webpack](guides/testing-single-file-components-with-mocha-webpack.md)
12+
- [Testing Single-File Components with Karma](guides/testing-single-file-components-with-karma.md)
13+
- [Testing Asynchronous Behavior](guides/testing-async-components.md)
14+
- [Using with TypeScript](guides/using-with-typescript.md)
15+
- [Using with Vue Router](guides/using-with-vue-router.md)
16+
- [Using with Vuex](guides/using-with-vuex.md)
17+
- [API](api/)
18+
- [mount](api/mount.md)
19+
- [shallowMount](api/shallowMount.md)
20+
- [render](api/render.md)
21+
- [renderToString](api/renderToString.md)
22+
- [Mounting Options](api/options.md)
2323
- [context](api/options.md#context)
2424
- [slots](api/options.md#slots)
2525
- [scopedSlots](api/options.md#scopedslots)
@@ -34,52 +34,52 @@ Vue Test Utils is the official unit testing utility library for Vue.js.
3434
- [provide](api/options.md#provide)
3535
- [sync](api/options.md#sync)
3636
- [other options](api/options.md#other-options)
37-
* [Wrapper](api/wrapper/)
38-
* [attributes](api/wrapper/attributes.md)
39-
* [classes](api/wrapper/classes.md)
40-
* [contains](api/wrapper/contains.md)
41-
* [emitted](api/wrapper/emitted.md)
42-
* [emittedByOrder](api/wrapper/emittedByOrder.md)
43-
* [exists](api/wrapper/exists.md)
44-
* [destroy](api/wrapper/destroy.md)
45-
* [find](api/wrapper/find.md)
46-
* [findAll](api/wrapper/findAll.md)
47-
* [html](api/wrapper/html.md)
48-
* [is](api/wrapper/is.md)
49-
* [isEmpty](api/wrapper/isEmpty.md)
50-
* [isVueInstance](api/wrapper/isVueInstance.md)
51-
* [name](api/wrapper/name.md)
52-
* [props](api/wrapper/props.md)
53-
* [setChecked](api/wrapper/setChecked.md)
54-
* [setData](api/wrapper/setData.md)
55-
* [setMethods](api/wrapper/setMethods.md)
56-
* [setProps](api/wrapper/setProps.md)
57-
* [setSelected](api/wrapper/setSelected.md)
58-
* [setValue](api/wrapper/setValue.md)
59-
* [text](api/wrapper/text.md)
60-
* [trigger](api/wrapper/trigger.md)
61-
* [isVisible](api/wrapper/isVisible.md)
62-
* [WrapperArray](api/wrapper-array/)
63-
* [at](api/wrapper-array/at.md)
64-
* [contains](api/wrapper-array/contains.md)
65-
* [exists](api/wrapper/exists.md)
66-
* [destroy](api/wrapper-array/destroy.md)
67-
* [filter](api/wrapper-array/filter.md)
68-
* [is](api/wrapper-array/is.md)
69-
* [isEmpty](api/wrapper-array/isEmpty.md)
70-
* [isVueInstance](api/wrapper-array/isVueInstance.md)
71-
* [setChecked](api/wrapper-array/setChecked.md)
72-
* [setData](api/wrapper-array/setData.md)
73-
* [setMethods](api/wrapper-array/setMethods.md)
74-
* [setProps](api/wrapper-array/setProps.md)
75-
* [setValue](api/wrapper-array/setValue.md)
76-
* [trigger](api/wrapper-array/trigger.md)
77-
* [isVisible](api/wrapper-array/isVisible.md)
78-
* [components](api/components/)
79-
* [TransitionStub](api/components/TransitionStub.md)
80-
* [TransitionGroupStub](api/components/TransitionGroupStub.md)
81-
* [RouterLinkStub](api/components/RouterLinkStub.md)
82-
* [Selectors](api/selectors.md)
83-
* [createWrapper](api/createWrapper.md)
84-
* [createLocalVue](api/createLocalVue.md)
85-
* [config](api/config.md)
37+
- [Wrapper](api/wrapper/)
38+
- [attributes](api/wrapper/attributes.md)
39+
- [classes](api/wrapper/classes.md)
40+
- [contains](api/wrapper/contains.md)
41+
- [emitted](api/wrapper/emitted.md)
42+
- [emittedByOrder](api/wrapper/emittedByOrder.md)
43+
- [exists](api/wrapper/exists.md)
44+
- [destroy](api/wrapper/destroy.md)
45+
- [find](api/wrapper/find.md)
46+
- [findAll](api/wrapper/findAll.md)
47+
- [html](api/wrapper/html.md)
48+
- [is](api/wrapper/is.md)
49+
- [isEmpty](api/wrapper/isEmpty.md)
50+
- [isVueInstance](api/wrapper/isVueInstance.md)
51+
- [name](api/wrapper/name.md)
52+
- [props](api/wrapper/props.md)
53+
- [setChecked](api/wrapper/setChecked.md)
54+
- [setData](api/wrapper/setData.md)
55+
- [setMethods](api/wrapper/setMethods.md)
56+
- [setProps](api/wrapper/setProps.md)
57+
- [setSelected](api/wrapper/setSelected.md)
58+
- [setValue](api/wrapper/setValue.md)
59+
- [text](api/wrapper/text.md)
60+
- [trigger](api/wrapper/trigger.md)
61+
- [isVisible](api/wrapper/isVisible.md)
62+
- [WrapperArray](api/wrapper-array/)
63+
- [at](api/wrapper-array/at.md)
64+
- [contains](api/wrapper-array/contains.md)
65+
- [exists](api/wrapper/exists.md)
66+
- [destroy](api/wrapper-array/destroy.md)
67+
- [filter](api/wrapper-array/filter.md)
68+
- [is](api/wrapper-array/is.md)
69+
- [isEmpty](api/wrapper-array/isEmpty.md)
70+
- [isVueInstance](api/wrapper-array/isVueInstance.md)
71+
- [setChecked](api/wrapper-array/setChecked.md)
72+
- [setData](api/wrapper-array/setData.md)
73+
- [setMethods](api/wrapper-array/setMethods.md)
74+
- [setProps](api/wrapper-array/setProps.md)
75+
- [setValue](api/wrapper-array/setValue.md)
76+
- [trigger](api/wrapper-array/trigger.md)
77+
- [isVisible](api/wrapper-array/isVisible.md)
78+
- [components](api/components/)
79+
- [TransitionStub](api/components/TransitionStub.md)
80+
- [TransitionGroupStub](api/components/TransitionGroupStub.md)
81+
- [RouterLinkStub](api/components/RouterLinkStub.md)
82+
- [Selectors](api/selectors.md)
83+
- [createWrapper](api/createWrapper.md)
84+
- [createLocalVue](api/createLocalVue.md)
85+
- [config](api/config.md)

docs/api/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
!!!include(docs/api/selectors.md)!!!
88
!!!include(docs/api/createLocalVue.md)!!!
99
!!!include(docs/api/createWrapper.md)!!!
10-
!!!include(docs/api/config.md)!!!
10+
!!!include(docs/api/config.md)!!!

docs/api/components/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ Vue Test Utils includes utility components you can use to stub components.
44

55
!!!include(docs/api/components/RouterLinkStub.md)!!!
66
!!!include(docs/api/components/TransitionStub.md)!!!
7-
!!!include(docs/api/components/TransitionGroupStub.md)!!!
7+
!!!include(docs/api/components/TransitionGroupStub.md)!!!

0 commit comments

Comments
 (0)