@modern-js/plugin-testing 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
@@ -1,36 +1,5 @@
|
|
1
1
|
# @modern-js/plugin-testing
|
2
2
|
|
3
|
-
## 1.2.1
|
4
|
-
|
5
|
-
### Patch Changes
|
6
|
-
|
7
|
-
- fix: type define
|
8
|
-
|
9
|
-
## 1.2.0
|
10
|
-
|
11
|
-
### Minor Changes
|
12
|
-
|
13
|
-
- 90eeb72c: add modern config schema and types of testing, tools.jest.
|
14
|
-
add typesVersions for re-exporting types of @modern-js/plugin-testing.
|
15
|
-
fix type lost when redeclareing modules.
|
16
|
-
- 5a4c557e: feat: support bff test
|
17
|
-
|
18
|
-
### Patch Changes
|
19
|
-
|
20
|
-
- Updated dependencies [90eeb72c]
|
21
|
-
- Updated dependencies [e04914ce]
|
22
|
-
- Updated dependencies [4406c2db]
|
23
|
-
- Updated dependencies [90eeb72c]
|
24
|
-
- Updated dependencies [5a4c557e]
|
25
|
-
- Updated dependencies [e04914ce]
|
26
|
-
- Updated dependencies [ca7dcb32]
|
27
|
-
- Updated dependencies [ecb344dc]
|
28
|
-
- @modern-js/core@1.2.0
|
29
|
-
- @modern-js/runtime-core@1.1.2
|
30
|
-
- @modern-js/testing@1.2.0
|
31
|
-
- @modern-js/babel-compiler@1.1.3
|
32
|
-
- @modern-js/utils@1.1.5
|
33
|
-
|
34
3
|
## 1.1.1
|
35
4
|
|
36
5
|
### Patch Changes
|
@@ -41,7 +41,9 @@ export default ((webpackConfig, userConfig, pwd) => createPlugin(() => ({
|
|
41
41
|
utils.setJestConfig({
|
42
42
|
rootDir: pwd || process.cwd(),
|
43
43
|
// todo: diffrent test root for diffrent solutions
|
44
|
-
testMatch: [`<rootDir>/(src|tests|electron)/**/*.test.[jt]s?(x)`]
|
44
|
+
// testMatch: [`<rootDir>/(src|tests|electron)/**/*.test.[jt]s?(x)`],
|
45
|
+
// testMatch bug on windows, issue: https://github.com/facebook/jest/issues/7914
|
46
|
+
testMatch: [`<rootDir>/src/**/*.test.[jt]s?(x)`, `<rootDir>/tests/**/*.test.[jt]s?(x)`, `<rootDir>/electron/**/*.test.[jt]s?(x)`]
|
45
47
|
});
|
46
48
|
return next(utils);
|
47
49
|
}
|
@@ -54,7 +54,9 @@ var _default = (webpackConfig, userConfig, pwd) => (0, _testing.createPlugin)(()
|
|
54
54
|
utils.setJestConfig({
|
55
55
|
rootDir: pwd || process.cwd(),
|
56
56
|
// todo: diffrent test root for diffrent solutions
|
57
|
-
testMatch: [`<rootDir>/(src|tests|electron)/**/*.test.[jt]s?(x)`]
|
57
|
+
// testMatch: [`<rootDir>/(src|tests|electron)/**/*.test.[jt]s?(x)`],
|
58
|
+
// testMatch bug on windows, issue: https://github.com/facebook/jest/issues/7914
|
59
|
+
testMatch: [`<rootDir>/src/**/*.test.[jt]s?(x)`, `<rootDir>/tests/**/*.test.[jt]s?(x)`, `<rootDir>/electron/**/*.test.[jt]s?(x)`]
|
58
60
|
});
|
59
61
|
return next(utils);
|
60
62
|
}
|
@@ -42,7 +42,9 @@ export default (function (webpackConfig, userConfig, pwd) {
|
|
42
42
|
utils.setJestConfig({
|
43
43
|
rootDir: pwd || process.cwd(),
|
44
44
|
// todo: diffrent test root for diffrent solutions
|
45
|
-
testMatch: [
|
45
|
+
// testMatch: [`<rootDir>/(src|tests|electron)/**/*.test.[jt]s?(x)`],
|
46
|
+
// testMatch bug on windows, issue: https://github.com/facebook/jest/issues/7914
|
47
|
+
testMatch: ["<rootDir>/src/**/*.test.[jt]s?(x)", "<rootDir>/tests/**/*.test.[jt]s?(x)", "<rootDir>/electron/**/*.test.[jt]s?(x)"]
|
46
48
|
});
|
47
49
|
return next(utils);
|
48
50
|
}
|
package/dist/types/cli/test.d.ts
CHANGED
@@ -1,8 +1,10 @@
|
|
1
|
-
|
1
|
+
declare const test: () => Promise<void>;
|
2
|
+
export default test;
|
2
3
|
declare module '@modern-js/core' {
|
3
4
|
interface UserConfig {
|
4
|
-
testing
|
5
|
+
testing?: import('@modern-js/testing').TestConfig;
|
5
6
|
}
|
6
|
-
|
7
|
-
|
8
|
-
|
7
|
+
interface ToolsConfig {
|
8
|
+
jest?: import('@modern-js/testing').TestConfig['jest'];
|
9
|
+
}
|
10
|
+
}
|
package/package.json
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
"modern",
|
12
12
|
"modern.js"
|
13
13
|
],
|
14
|
-
"version": "1.2.
|
14
|
+
"version": "1.2.2",
|
15
15
|
"jsnext:source": "./src/index.ts",
|
16
16
|
"types": "./dist/types/index.d.ts",
|
17
17
|
"main": "./dist/js/node/index.js",
|
@@ -56,9 +56,9 @@
|
|
56
56
|
"dependencies": {
|
57
57
|
"@babel/preset-env": "^7.15.6",
|
58
58
|
"@babel/runtime": "^7",
|
59
|
-
"@modern-js/babel-compiler": "^1.
|
60
|
-
"@modern-js/testing": "^1.
|
61
|
-
"@modern-js/utils": "^1.
|
59
|
+
"@modern-js/babel-compiler": "^1.0.0",
|
60
|
+
"@modern-js/testing": "^1.0.0",
|
61
|
+
"@modern-js/utils": "^1.0.0",
|
62
62
|
"@modern-js/webpack": "^1.0.0",
|
63
63
|
"@testing-library/jest-dom": "^5.14.1",
|
64
64
|
"@testing-library/react": "^12.0.0",
|
@@ -70,18 +70,18 @@
|
|
70
70
|
"@modern-js-reduck/plugin-effects": "^1.0.0",
|
71
71
|
"@modern-js-reduck/plugin-immutable": "^1.0.0",
|
72
72
|
"@modern-js-reduck/store": "^1.0.0",
|
73
|
-
"@modern-js/core": "^1.
|
74
|
-
"@modern-js/runtime-core": "^1.
|
73
|
+
"@modern-js/core": "^1.0.0",
|
74
|
+
"@modern-js/runtime-core": "^1.0.0"
|
75
75
|
},
|
76
76
|
"devDependencies": {
|
77
77
|
"@modern-js-reduck/plugin-auto-actions": "^1.0.0",
|
78
78
|
"@modern-js-reduck/plugin-effects": "^1.0.0",
|
79
79
|
"@modern-js-reduck/plugin-immutable": "^1.0.0",
|
80
80
|
"@modern-js-reduck/store": "^1.0.0",
|
81
|
-
"@modern-js/plugin-testing": "^1.
|
82
|
-
"@modern-js/module-tools": "^1.1.
|
83
|
-
"@modern-js/core": "^1.
|
84
|
-
"@modern-js/runtime-core": "^1.
|
81
|
+
"@modern-js/plugin-testing": "^1.1.1",
|
82
|
+
"@modern-js/module-tools": "^1.1.1",
|
83
|
+
"@modern-js/core": "^1.0.0",
|
84
|
+
"@modern-js/runtime-core": "^1.0.0",
|
85
85
|
"@types/jest": "^26",
|
86
86
|
"@types/node": "^14",
|
87
87
|
"@types/react": "^17",
|
@@ -98,5 +98,6 @@
|
|
98
98
|
"new": "modern new",
|
99
99
|
"build": "modern build",
|
100
100
|
"test": "modern test --passWithNoTests"
|
101
|
-
}
|
101
|
+
},
|
102
|
+
"readme": "\n<p align=\"center\">\n <a href=\"https://modernjs.dev\" target=\"blank\"><img src=\"https://lf3-static.bytednsdoc.com/obj/eden-cn/ylaelkeh7nuhfnuhf/modernjs-cover.png\" width=\"300\" alt=\"Modern.js Logo\" /></a>\n</p>\n<p align=\"center\">\n现代 Web 工程体系\n <br/>\n <a href=\"https://modernjs.dev\" target=\"blank\">\n modernjs.dev\n </a>\n</p>\n<p align=\"center\">\n The meta-framework suite designed from scratch for frontend-focused modern web development\n</p>\n\n# Introduction\n\n> The doc site ([modernjs.dev](https://modernjs.dev)) and articles are only available in Chinese for now, we are planning to add English versions soon.\n\n- [Modern.js: Hello, World!](https://zhuanlan.zhihu.com/p/426707646)\n\n## Getting Started\n\n- [Quick Start](https://modernjs.dev/docs/start)\n- [Guides](https://modernjs.dev/docs/guides)\n- [API References](https://modernjs.dev/docs/apis)\n\n## Contributing\n\n- [Contributing Guide](https://github.com/modern-js-dev/modern.js/blob/main/CONTRIBUTING.md)\n"
|
102
103
|
}
|
@@ -46,7 +46,13 @@ export default (webpackConfig: any, userConfig: any, pwd: string) =>
|
|
46
46
|
utils.setJestConfig({
|
47
47
|
rootDir: pwd || process.cwd(),
|
48
48
|
// todo: diffrent test root for diffrent solutions
|
49
|
-
testMatch: [`<rootDir>/(src|tests|electron)/**/*.test.[jt]s?(x)`],
|
49
|
+
// testMatch: [`<rootDir>/(src|tests|electron)/**/*.test.[jt]s?(x)`],
|
50
|
+
// testMatch bug on windows, issue: https://github.com/facebook/jest/issues/7914
|
51
|
+
testMatch: [
|
52
|
+
`<rootDir>/src/**/*.test.[jt]s?(x)`,
|
53
|
+
`<rootDir>/tests/**/*.test.[jt]s?(x)`,
|
54
|
+
`<rootDir>/electron/**/*.test.[jt]s?(x)`,
|
55
|
+
],
|
50
56
|
});
|
51
57
|
|
52
58
|
return next(utils);
|