Commit Graph

53 Commits

Author SHA1 Message Date
Haoqun Jiang
51cdebdadf fix applyESLint when eslint plugin is added after unit test plugins (#5028)
* fix: fix applyESLint when eslint plugin is added after unit test plugins

closes #5017

* test: update test for mocha generator
2020-01-27 21:44:36 +08:00
Haoqun Jiang
84aed8ef10 chore: dependency maintenance 2019-11-27 00:34:22 +08:00
Haoqun Jiang
ed50ceb255 refactor: rename jest presets (#4609)
* refactor: rename jest presets

Follow up of #4597.
Renamed `preset` folder to `presets`.
Added a default preset and it is accessible in the short form of
`@vue/cli-plugin-unit-jest`.

This change is inspired by ts-jest presets:
https://kulshekhar.github.io/ts-jest/user/config/#jest-preset

* fix: update import path

* fix: fix typo in file path
2019-09-25 00:02:39 +08:00
Haoqun Jiang
2e1e92b7e8 refactor: move jest configs into presets (#4597)
* refactor: move jest configs into a preset

This could significantly reduce the size of default boilerplate,
and gives us more control on the internal config details, thus
potentially making future upgrades easier.

* fix: add back applyTS
2019-09-23 18:22:59 +08:00
Thorsten Lünborg
58177d25cd fix: eslint should override env for **/tests/** subfolders (#4447)
close #4397
2019-08-21 15:34:16 +08:00
Haoqun Jiang
2ce1fc0982 chore: update deps 2019-05-25 14:34:43 +08:00
Haoqun Jiang
5d1da587be fix: fix peer dependencies for ts-jest & babel-jest 2019-04-30 20:22:14 +08:00
Haoqun Jiang
f395697197 fix: revert accidentally committed jest related changes 2019-04-30 19:52:04 +08:00
Haoqun Jiang
4f0cd2da66 workflow: add dist-tag when publishing [ci skip] 2019-04-30 19:43:20 +08:00
Haoqun Jiang
3495aa2895 feat!: upgrade jest to v24 (#3870)
BREAKING CHANGE:
See:
https://jestjs.io/blog/2019/01/25/jest-24-refreshing-polished-typescript-friendly
20ba4be949/CHANGELOG.md (2400)

closes #3450
closes #3605
closes #3497
2019-04-30 10:18:31 +08:00
Cédric Exbrayat
50061101ec fix: jest typeahead config (#3815)
fixes #3814
2019-04-16 14:32:30 +08:00
Haoqun Jiang
75bc181d62 feat: add jest typeahead plugin (#3589)
closes #1908
2019-04-01 14:19:56 +08:00
Thorsten Lünborg
d23e728c32 docs: Document jest's transformIgnorePatterns option to avoid pitfall (#3523) [ci skip] 2019-03-10 22:49:55 +08:00
Haoqun Jiang
266090da2a fix: lock @vue/test-utils version as it's still in beta and may introduce breaking changes 2019-02-25 00:39:55 +08:00
Haoqun Jiang
4feaacfc83 fix: fix typo in jest config 2019-01-02 16:29:17 +08:00
Thorsten Lünborg
c9aaa2ff5a fix(cli-plugin-unit-jest): When using TS & Babel, make ts-jest use babelConfig (#3107)
* fix(cli-plugin-unit-jest): use ts-jest babelConfig

When using Typescript and Babel, ts-jest should use babel to transform result for correct JSX transforms

close #3100

* refactor:  write generator a bit differently.

previous way could end up with ugly `global: undefined`
when not using babel
2018-12-29 19:09:56 +08:00
Haoqun Jiang
8a54ef60dc chore: upgrade deps (#2642)
closes #2376


* chore: update deps

* fix: remove extraneous require

* fix: force @babel/core resolution to be ^7.0.0

Previously it was interfered by vue-apollo & vuepress 0.14

* fix: sync deps

* chore: update yarn.lock
2018-10-20 21:29:17 +08:00
Mickaël
3def765ba4 fix(cli-plugin-unit-jest): also process SVG files with jest-transform-stub (#2368)
Avoids getting a Jest unexpected token exception when requiring SVG files in template.
2018-09-05 14:33:15 +08:00
Evan You
6bdf7040d4 chore: remove unnecessary rules for unit test eslint config 2018-08-18 15:44:33 -04:00
Evan You
b62c6ba7f2 fix: ensure unit test examples work in projects created with --bare
close #2262
2018-08-18 15:41:44 -04:00
Evan You
99761b350d fix(jest): make sure jest tests work without babel
close #2040
2018-08-05 21:50:31 -04:00
Evan You
252dd3d9e1 fix: improve jest/mocha add compat with typescript 2018-07-28 23:07:41 -04:00
Evan You
ba43900657 refactor: add invoking flag for generators, fix eslint + ts
close #1972
2018-07-28 15:53:24 -04:00
Evan You
7d65353661 fix(jest): fix jest tests due to jsdom 11.12.0
close #1960
2018-07-27 09:21:17 -04:00
Guillaume Chau
96778b2caf chore: update main deps (#1772)
* chore: update main deps

* chore: update ts types

* chore: update generator deps versions

* fix: ts-jest

* chore: upgrade ts-jest again

* fix: re-generated yarn.lock

* chore: more upgrades

* fix: jest test matching on Windows
2018-07-08 13:56:10 +02:00
Darko Demić
47794ae904 fix(unit:jest): issue with Jest configuration regex not matching template. (#1756) 2018-07-04 18:43:36 +02:00
Evan You
65d5d36d39 fix: transform es modules syntax for Jest when not using Babel
close #1524
2018-06-08 18:41:14 -04:00
Evan You
7e38f98ec8 feat: upgrade jest to 23.1.0
BREAKING CHANGE: jest is upgraded to 23.1.0 with minor breaking changes
but should not affect normal test cases
2018-06-01 12:42:24 -04:00
Evan You
a91d022d42 fix: should not inject babel-core shim if babel plugin is not used
close #1424
2018-06-01 12:41:23 -04:00
Evan You
55159991db chore: bump deps 2018-05-11 17:59:16 -04:00
Evan You
e5d7893587 test: bump test-utils version 2018-05-11 13:00:26 -04:00
arszp10
5c54df799a fix: rename test-utils shallow to shallowMount (#1269) 2018-05-11 12:39:06 -04:00
Evan You
69ebd800a2 refactor: rename test commands
BREAKING CHANGE: `cli-plugin-unit-jest` and `cli-plugin-unit-mocha` now register
"test:unit" command and script instead of "test"; `cli-plugin-e2e-cypress` now
register "test:e2e" with optional `--headless` flag instead of "e2e" and
"e2e:open"; `cli-plugin-e2e-nightwatch` now register "test:e2e" instead of "e2e".

close #876, close #878
2018-05-01 18:15:25 -04:00
keng0o
be3bede772 fix(unit-jest): handle static asset imports (#1180) 2018-04-27 14:04:02 -04:00
Evan You
9cfafea328 refactor(cli): default to .js for eslintrc and postcssrc
close #994
2018-04-27 12:45:45 -04:00
Derek Henscheid
cac18f231e fix: allow user to define testMatch in package.json (#1069)
close #1067
2018-04-25 17:50:41 -04:00
Evan You
64b4515731 refactor: change default test directory name to "tests"
BREAKING CHANGE: all tests are now located in "tests" instead of "test"
close #877
2018-02-28 18:07:06 -05:00
ziga
6ae22fa09e chore: remove map coverage. (#866)
Bacause it's deprecated.
2018-02-22 13:55:25 -05:00
Evan You
d391e4741e fix: eslint + airbnb compat with TypeScript 2018-02-16 11:38:39 +01:00
Kévin Dunglas
1902d9c41c chore: fix the name of the tested file (#775)
* Jest template: fix the name of the tested file (Hello.vue instead of HelloWorld.vue)

* Jest template: fix the name of the tested file
2018-02-06 13:40:53 -05:00
Evan You
d7c6af713c fix: force babel-core version when using ts + babel 2018-01-25 15:28:42 -05:00
Evan You
ea2648e62b feat: make jest plugin work with TypeScript 2018-01-15 15:16:08 -05:00
Evan You
bb5d968e09 feat: WIP jest plugin 2018-01-15 13:53:41 -05:00
Evan You
132b0db8e4 feat: wip invoke command 2018-01-14 19:11:26 -05:00
Evan You
cc35923452 Revert "move all deps to dependencies instead of devDependencies"
This reverts commit be4bf6fd7d.
2018-01-10 14:50:39 -05:00
Evan You
72b44f5bd1 chore: vue-test-utils -> @vue/test-utils 2018-01-10 11:41:47 -05:00
Evan You
be4bf6fd7d move all deps to dependencies instead of devDependencies 2018-01-10 11:18:30 -05:00
Evan You
4fb8484ce5 toContain -> toMatch 2018-01-05 18:05:41 -05:00
Evan You
8f84396337 wip: lint 2017-12-31 19:54:50 -05:00
Evan You
21187b4801 feat: mocha-webpack plugin 2017-12-30 20:03:05 -05:00