@modern-js/plugin-testing 0.0.0-next-20240611072644 → 0.0.0-next-20240611081709

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.
@@ -38,14 +38,6 @@ const test = async (api) => {
38
38
  var _userConfig_tools, _userConfig_tools1;
39
39
  const userConfig = api.useResolvedConfigContext();
40
40
  const appContext = api.useAppContext();
41
- const runner = api.useHookRunners();
42
- const { plugins } = await runner._internalServerPlugins({
43
- plugins: []
44
- });
45
- api.setAppContext({
46
- ...api.useAppContext(),
47
- serverPlugins: plugins
48
- });
49
41
  userConfig.testing = userConfig.testing || {};
50
42
  const jest = userConfig.testing.jest || (userConfig === null || userConfig === void 0 ? void 0 : (_userConfig_tools = userConfig.tools) === null || _userConfig_tools === void 0 ? void 0 : _userConfig_tools.jest);
51
43
  if (Array.isArray(jest)) {
@@ -1,30 +1,16 @@
1
1
  import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
2
- import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
3
- import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
4
2
  import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
5
3
  import path from "path";
6
4
  import { compiler } from "@modern-js/babel-compiler";
7
5
  import { runTest } from "../base";
8
6
  var test = function() {
9
7
  var _ref = _async_to_generator(function(api) {
10
- var _userConfig_tools, _userConfig_tools1, userConfig, appContext, runner, plugins, jest, runtimeExportsPath;
8
+ var _userConfig_tools, _userConfig_tools1, userConfig, appContext, jest, runtimeExportsPath;
11
9
  return _ts_generator(this, function(_state) {
12
10
  switch (_state.label) {
13
11
  case 0:
14
12
  userConfig = api.useResolvedConfigContext();
15
13
  appContext = api.useAppContext();
16
- runner = api.useHookRunners();
17
- return [
18
- 4,
19
- runner._internalServerPlugins({
20
- plugins: []
21
- })
22
- ];
23
- case 1:
24
- plugins = _state.sent().plugins;
25
- api.setAppContext(_object_spread_props(_object_spread({}, api.useAppContext()), {
26
- serverPlugins: plugins
27
- }));
28
14
  userConfig.testing = userConfig.testing || {};
29
15
  jest = userConfig.testing.jest || (userConfig === null || userConfig === void 0 ? void 0 : (_userConfig_tools = userConfig.tools) === null || _userConfig_tools === void 0 ? void 0 : _userConfig_tools.jest);
30
16
  if (Array.isArray(jest)) {
@@ -50,13 +36,13 @@ var test = function() {
50
36
  ]
51
37
  })
52
38
  ];
53
- case 2:
39
+ case 1:
54
40
  _state.sent();
55
41
  return [
56
42
  4,
57
43
  runTest(api, userConfig.testing)
58
44
  ];
59
- case 3:
45
+ case 2:
60
46
  _state.sent();
61
47
  return [
62
48
  2
@@ -5,14 +5,6 @@ const test = async (api) => {
5
5
  var _userConfig_tools, _userConfig_tools1;
6
6
  const userConfig = api.useResolvedConfigContext();
7
7
  const appContext = api.useAppContext();
8
- const runner = api.useHookRunners();
9
- const { plugins } = await runner._internalServerPlugins({
10
- plugins: []
11
- });
12
- api.setAppContext({
13
- ...api.useAppContext(),
14
- serverPlugins: plugins
15
- });
16
8
  userConfig.testing = userConfig.testing || {};
17
9
  const jest = userConfig.testing.jest || (userConfig === null || userConfig === void 0 ? void 0 : (_userConfig_tools = userConfig.tools) === null || _userConfig_tools === void 0 ? void 0 : _userConfig_tools.jest);
18
10
  if (Array.isArray(jest)) {
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "0.0.0-next-20240611072644",
18
+ "version": "0.0.0-next-20240611081709",
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",
@@ -131,17 +131,17 @@
131
131
  "ts-jest": "^29.1.0",
132
132
  "yargs": "^17.0.1",
133
133
  "@swc/helpers": "0.5.3",
134
- "@modern-js/babel-compiler": "0.0.0-next-20240611072644",
135
- "@modern-js/prod-server": "0.0.0-next-20240611072644",
136
- "@modern-js/utils": "0.0.0-next-20240611072644",
137
- "@modern-js/plugin": "0.0.0-next-20240611072644",
138
- "@modern-js/types": "0.0.0-next-20240611072644",
139
- "@modern-js/bff-core": "0.0.0-next-20240611072644"
134
+ "@modern-js/babel-compiler": "0.0.0-next-20240611081709",
135
+ "@modern-js/plugin": "0.0.0-next-20240611081709",
136
+ "@modern-js/utils": "0.0.0-next-20240611081709",
137
+ "@modern-js/prod-server": "0.0.0-next-20240611081709",
138
+ "@modern-js/bff-core": "0.0.0-next-20240611081709",
139
+ "@modern-js/types": "0.0.0-next-20240611081709"
140
140
  },
141
141
  "peerDependencies": {
142
142
  "react": ">=17",
143
143
  "react-dom": ">=17",
144
- "@modern-js/runtime": "0.0.0-next-20240611072644"
144
+ "@modern-js/runtime": "0.0.0-next-20240611081709"
145
145
  },
146
146
  "peerDependenciesMeta": {
147
147
  "@modern-js/runtime": {
@@ -156,10 +156,10 @@
156
156
  "@types/node": "^14",
157
157
  "@types/yargs": "^17.0.2",
158
158
  "typescript": "^5",
159
- "@modern-js/runtime": "0.0.0-next-20240611072644",
160
- "@modern-js/core": "0.0.0-next-20240611072644",
161
- "@scripts/jest-config": "0.0.0-next-20240611072644",
162
- "@scripts/build": "0.0.0-next-20240611072644"
159
+ "@modern-js/runtime": "0.0.0-next-20240611081709",
160
+ "@modern-js/core": "0.0.0-next-20240611081709",
161
+ "@scripts/build": "0.0.0-next-20240611081709",
162
+ "@scripts/jest-config": "0.0.0-next-20240611081709"
163
163
  },
164
164
  "sideEffects": false,
165
165
  "publishConfig": {