@modern-js/plugin-testing 0.0.0-next-1685343732023 → 0.0.0-next-1685383616364
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 +13 -13
- package/dist/cjs/base/config/index.js +9 -3
- package/dist/cjs/base/config/patches/assetsModule.js +3 -1
- package/dist/cjs/base/config/patches/filemock.js +3 -1
- package/dist/cjs/base/config/patches/index.js +3 -1
- package/dist/cjs/base/config/patches/transformer.js +3 -1
- package/dist/cjs/base/config/testConfigOperator.js +3 -1
- package/dist/cjs/base/config/transformer/babelTransformer.js +3 -1
- package/dist/cjs/base/hook.js +9 -3
- package/dist/cjs/base/index.js +18 -6
- package/dist/cjs/base/runJest.js +6 -2
- package/dist/cjs/base/utils.js +9 -3
- package/dist/cjs/cli/bff/app.js +12 -4
- package/dist/cjs/cli/bff/constant.js +3 -1
- package/dist/cjs/cli/bff/index.js +6 -2
- package/dist/cjs/cli/bff/mockAPI.js +3 -1
- package/dist/cjs/cli/bff/utils/index.js +3 -1
- package/dist/cjs/cli/index.js +6 -2
- package/dist/cjs/cli/test.js +3 -1
- package/dist/cjs/constant.js +3 -1
- package/dist/cjs/runtime-testing/app.js +3 -1
- package/dist/cjs/runtime-testing/base.js +6 -2
- package/dist/cjs/runtime-testing/customRender.js +3 -1
- package/dist/cjs/runtime-testing/reduck.js +12 -4
- package/dist/cjs/runtime-testing/request.js +3 -1
- package/dist/cjs/runtime-testing/resolvePlugins.js +3 -1
- package/package.json +13 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
# @modern-js/plugin-testing
|
|
2
2
|
|
|
3
|
-
## 0.0.0-next-
|
|
3
|
+
## 0.0.0-next-1685383616364
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
7
|
+
- 3d48836b3: chore(deps): fix all missing peer dependencies
|
|
8
8
|
|
|
9
9
|
chore(deps): 修复缺少的 peer dependencies
|
|
10
10
|
|
|
11
|
-
- Updated dependencies [
|
|
12
|
-
- Updated dependencies [
|
|
13
|
-
- Updated dependencies [
|
|
14
|
-
- Updated dependencies [
|
|
15
|
-
- Updated dependencies [
|
|
16
|
-
- @modern-js/runtime@0.0.0-next-
|
|
17
|
-
- @modern-js/utils@0.0.0-next-
|
|
18
|
-
- @modern-js/prod-server@0.0.0-next-
|
|
19
|
-
- @modern-js/babel-preset-app@0.0.0-next-
|
|
20
|
-
- @modern-js/babel-compiler@0.0.0-next-
|
|
21
|
-
- @modern-js/plugin@0.0.0-next-
|
|
11
|
+
- Updated dependencies [3d48836b3]
|
|
12
|
+
- Updated dependencies [5050e8e6b]
|
|
13
|
+
- Updated dependencies [4991c8ad0]
|
|
14
|
+
- Updated dependencies [79180c20a]
|
|
15
|
+
- Updated dependencies [c271c5dbe]
|
|
16
|
+
- @modern-js/runtime@0.0.0-next-1685383616364
|
|
17
|
+
- @modern-js/utils@0.0.0-next-1685383616364
|
|
18
|
+
- @modern-js/prod-server@0.0.0-next-1685383616364
|
|
19
|
+
- @modern-js/babel-preset-app@0.0.0-next-1685383616364
|
|
20
|
+
- @modern-js/babel-compiler@0.0.0-next-1685383616364
|
|
21
|
+
- @modern-js/plugin@0.0.0-next-1685383616364
|
|
22
22
|
|
|
23
23
|
## 2.21.1
|
|
24
24
|
|
|
@@ -10,9 +10,15 @@ function _export(target, all) {
|
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
DEFAULT_RESOLVER_PATH: ()
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
DEFAULT_RESOLVER_PATH: function() {
|
|
14
|
+
return DEFAULT_RESOLVER_PATH;
|
|
15
|
+
},
|
|
16
|
+
getJestUtils: function() {
|
|
17
|
+
return getJestUtils;
|
|
18
|
+
},
|
|
19
|
+
patchConfig: function() {
|
|
20
|
+
return patchConfig;
|
|
21
|
+
}
|
|
16
22
|
});
|
|
17
23
|
const _patches = require("./patches");
|
|
18
24
|
const _testConfigOperator = require("./testConfigOperator");
|
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "patchAssetsModule", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return patchAssetsModule;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
11
|
const patchAssetsModule = (testOperator) => {
|
|
10
12
|
testOperator.mergeJestConfig({
|
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "applyPatches", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return applyPatches;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
11
|
const _transformer = require("./transformer");
|
|
10
12
|
const _assetsModule = require("./assetsModule");
|
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "patchTransformer", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return patchTransformer;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
11
|
const _utils = require("../../utils");
|
|
10
12
|
const resolveTsCompilerOptions = () => {
|
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "TestConfigOperator", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return TestConfigOperator;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
11
|
const _define_property = require("@swc/helpers/_/_define_property");
|
|
10
12
|
const _lodash = require("@modern-js/utils/lodash");
|
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "default", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
11
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
10
12
|
const _babeljest = /* @__PURE__ */ _interop_require_default._(require("babel-jest"));
|
package/dist/cjs/base/hook.js
CHANGED
|
@@ -10,9 +10,15 @@ function _export(target, all) {
|
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
jestConfigHook: ()
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
jestConfigHook: function() {
|
|
14
|
+
return jestConfigHook;
|
|
15
|
+
},
|
|
16
|
+
afterTestHook: function() {
|
|
17
|
+
return afterTestHook;
|
|
18
|
+
},
|
|
19
|
+
testingHooks: function() {
|
|
20
|
+
return testingHooks;
|
|
21
|
+
}
|
|
16
22
|
});
|
|
17
23
|
const _plugin = require("@modern-js/plugin");
|
|
18
24
|
const jestConfigHook = (0, _plugin.createAsyncPipeline)();
|
package/dist/cjs/base/index.js
CHANGED
|
@@ -10,12 +10,24 @@ function _export(target, all) {
|
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
runTest: ()
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
runTest: function() {
|
|
14
|
+
return _runJest.runTest;
|
|
15
|
+
},
|
|
16
|
+
runJest: function() {
|
|
17
|
+
return _runJest.runJest;
|
|
18
|
+
},
|
|
19
|
+
getModuleNameMapper: function() {
|
|
20
|
+
return _utils.getModuleNameMapper;
|
|
21
|
+
},
|
|
22
|
+
DEFAULT_RESOLVER_PATH: function() {
|
|
23
|
+
return _config.DEFAULT_RESOLVER_PATH;
|
|
24
|
+
},
|
|
25
|
+
TestConfigOperator: function() {
|
|
26
|
+
return _testConfigOperator.TestConfigOperator;
|
|
27
|
+
},
|
|
28
|
+
testingHooks: function() {
|
|
29
|
+
return _hook.testingHooks;
|
|
30
|
+
}
|
|
19
31
|
});
|
|
20
32
|
const _export_star = require("@swc/helpers/_/_export_star");
|
|
21
33
|
const _runJest = require("./runJest");
|
package/dist/cjs/base/runJest.js
CHANGED
|
@@ -10,8 +10,12 @@ function _export(target, all) {
|
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
runJest: ()
|
|
14
|
-
|
|
13
|
+
runJest: function() {
|
|
14
|
+
return runJest;
|
|
15
|
+
},
|
|
16
|
+
runTest: function() {
|
|
17
|
+
return runTest;
|
|
18
|
+
}
|
|
15
19
|
});
|
|
16
20
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
17
21
|
const _yargs = /* @__PURE__ */ _interop_require_default._(require("yargs/yargs"));
|
package/dist/cjs/base/utils.js
CHANGED
|
@@ -10,9 +10,15 @@ function _export(target, all) {
|
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
debug: ()
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
debug: function() {
|
|
14
|
+
return debug;
|
|
15
|
+
},
|
|
16
|
+
readCompilerOptions: function() {
|
|
17
|
+
return readCompilerOptions;
|
|
18
|
+
},
|
|
19
|
+
getModuleNameMapper: function() {
|
|
20
|
+
return getModuleNameMapper;
|
|
21
|
+
}
|
|
16
22
|
});
|
|
17
23
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
18
24
|
const _fs = /* @__PURE__ */ _interop_require_default._(require("fs"));
|
package/dist/cjs/cli/bff/app.js
CHANGED
|
@@ -10,10 +10,18 @@ function _export(target, all) {
|
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
isInHandler: ()
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
isInHandler: function() {
|
|
14
|
+
return isInHandler;
|
|
15
|
+
},
|
|
16
|
+
createApp: function() {
|
|
17
|
+
return createApp;
|
|
18
|
+
},
|
|
19
|
+
getApp: function() {
|
|
20
|
+
return getApp;
|
|
21
|
+
},
|
|
22
|
+
closeServer: function() {
|
|
23
|
+
return closeServer;
|
|
24
|
+
}
|
|
17
25
|
});
|
|
18
26
|
const _async_hooks = require("async_hooks");
|
|
19
27
|
const _prodserver = require("@modern-js/prod-server");
|
|
@@ -10,8 +10,12 @@ function _export(target, all) {
|
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
setJestConfigForBFF: ()
|
|
14
|
-
|
|
13
|
+
setJestConfigForBFF: function() {
|
|
14
|
+
return setJestConfigForBFF;
|
|
15
|
+
},
|
|
16
|
+
default: function() {
|
|
17
|
+
return _default;
|
|
18
|
+
}
|
|
15
19
|
});
|
|
16
20
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
17
21
|
const _path = /* @__PURE__ */ _interop_require_default._(require("path"));
|
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "default", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
11
|
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
10
12
|
const _pathtoregexp = /* @__PURE__ */ _interop_require_wildcard._(require("path-to-regexp"));
|
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "isBFFProject", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return isBFFProject;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
11
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
10
12
|
const _path = /* @__PURE__ */ _interop_require_default._(require("path"));
|
package/dist/cjs/cli/index.js
CHANGED
|
@@ -10,8 +10,12 @@ function _export(target, all) {
|
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
mergeUserJestConfig: ()
|
|
14
|
-
|
|
13
|
+
mergeUserJestConfig: function() {
|
|
14
|
+
return mergeUserJestConfig;
|
|
15
|
+
},
|
|
16
|
+
default: function() {
|
|
17
|
+
return _default;
|
|
18
|
+
}
|
|
15
19
|
});
|
|
16
20
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
17
21
|
const _path = /* @__PURE__ */ _interop_require_default._(require("path"));
|
package/dist/cjs/cli/test.js
CHANGED
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "default", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
11
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
10
12
|
const _path = /* @__PURE__ */ _interop_require_default._(require("path"));
|
package/dist/cjs/constant.js
CHANGED
|
@@ -4,6 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "MODERNJS_CONFIG_KEY", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return MODERNJS_CONFIG_KEY;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
11
|
const MODERNJS_CONFIG_KEY = "__modernjs_config__";
|
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "default", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
11
|
const _define_property = require("@swc/helpers/_/_define_property");
|
|
10
12
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
@@ -10,8 +10,12 @@ function _export(target, all) {
|
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
renderApp: ()
|
|
14
|
-
|
|
13
|
+
renderApp: function() {
|
|
14
|
+
return _customRender.default;
|
|
15
|
+
},
|
|
16
|
+
testBff: function() {
|
|
17
|
+
return _request.request;
|
|
18
|
+
}
|
|
15
19
|
});
|
|
16
20
|
const _export_star = require("@swc/helpers/_/_export_star");
|
|
17
21
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "default", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
11
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
10
12
|
const _react = /* @__PURE__ */ _interop_require_default._(require("react"));
|
|
@@ -10,10 +10,18 @@ function _export(target, all) {
|
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
effects: ()
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
effects: function() {
|
|
14
|
+
return effects;
|
|
15
|
+
},
|
|
16
|
+
immer: function() {
|
|
17
|
+
return immer;
|
|
18
|
+
},
|
|
19
|
+
autoActions: function() {
|
|
20
|
+
return autoActions;
|
|
21
|
+
},
|
|
22
|
+
createStore: function() {
|
|
23
|
+
return createStore;
|
|
24
|
+
}
|
|
17
25
|
});
|
|
18
26
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
19
27
|
const _store = require("@modern-js-reduck/store");
|
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "request", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return request;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
11
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
10
12
|
const _supertest = /* @__PURE__ */ _interop_require_default._(require("supertest"));
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "0.0.0-next-
|
|
18
|
+
"version": "0.0.0-next-1685383616364",
|
|
19
19
|
"jsnext:source": "./src/cli/index.ts",
|
|
20
20
|
"types": "./dist/types/cli/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/cli/index.js",
|
|
@@ -117,16 +117,16 @@
|
|
|
117
117
|
"ts-jest": "^29.1.0",
|
|
118
118
|
"yargs": "^17.0.1",
|
|
119
119
|
"@swc/helpers": "0.5.1",
|
|
120
|
-
"@modern-js/babel-compiler": "0.0.0-next-
|
|
121
|
-
"@modern-js/utils": "0.0.0-next-
|
|
122
|
-
"@modern-js/babel-preset-app": "0.0.0-next-
|
|
123
|
-
"@modern-js/plugin": "0.0.0-next-
|
|
124
|
-
"@modern-js/prod-server": "0.0.0-next-
|
|
120
|
+
"@modern-js/babel-compiler": "0.0.0-next-1685383616364",
|
|
121
|
+
"@modern-js/utils": "0.0.0-next-1685383616364",
|
|
122
|
+
"@modern-js/babel-preset-app": "0.0.0-next-1685383616364",
|
|
123
|
+
"@modern-js/plugin": "0.0.0-next-1685383616364",
|
|
124
|
+
"@modern-js/prod-server": "0.0.0-next-1685383616364"
|
|
125
125
|
},
|
|
126
126
|
"peerDependencies": {
|
|
127
127
|
"react": ">=17",
|
|
128
128
|
"react-dom": ">=17",
|
|
129
|
-
"@modern-js/runtime": "0.0.0-next-
|
|
129
|
+
"@modern-js/runtime": "0.0.0-next-1685383616364"
|
|
130
130
|
},
|
|
131
131
|
"peerDependenciesMeta": {
|
|
132
132
|
"@modern-js/runtime": {
|
|
@@ -141,12 +141,12 @@
|
|
|
141
141
|
"@types/node": "^14",
|
|
142
142
|
"@types/yargs": "^17.0.2",
|
|
143
143
|
"typescript": "^5",
|
|
144
|
-
"@modern-js/core": "0.0.0-next-
|
|
145
|
-
"@modern-js/
|
|
146
|
-
"@modern-js/
|
|
147
|
-
"@modern-js/bff-core": "0.0.0-next-
|
|
148
|
-
"@scripts/build": "0.0.0-next-
|
|
149
|
-
"@scripts/jest-config": "0.0.0-next-
|
|
144
|
+
"@modern-js/core": "0.0.0-next-1685383616364",
|
|
145
|
+
"@modern-js/runtime": "0.0.0-next-1685383616364",
|
|
146
|
+
"@modern-js/types": "0.0.0-next-1685383616364",
|
|
147
|
+
"@modern-js/bff-core": "0.0.0-next-1685383616364",
|
|
148
|
+
"@scripts/build": "0.0.0-next-1685383616364",
|
|
149
|
+
"@scripts/jest-config": "0.0.0-next-1685383616364"
|
|
150
150
|
},
|
|
151
151
|
"sideEffects": false,
|
|
152
152
|
"modernConfig": {},
|