@rstest/core 0.7.1 → 0.7.3
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/LICENSE.md +1 -1
- package/dist/0~122.js +16 -6
- package/dist/0~151.js +485 -307
- package/dist/0~173.js +27 -27
- package/dist/0~403.js +7 -7
- package/dist/0~583.js +2 -2
- package/dist/0~588.js +6 -6
- package/dist/0~62.js +1 -1
- package/dist/0~634.js +20 -18
- package/dist/0~809.js +1 -1
- package/dist/0~835.js +4 -4
- package/dist/0~919.js +65 -33
- package/dist/0~923.js +4 -4
- package/dist/{155.js → 131.js} +62 -144
- package/dist/404.js +210 -0
- package/dist/{362.js → 554.js} +134 -111
- package/dist/672.js +91 -0
- package/dist/734.js +1 -1
- package/dist/946.js +47 -31
- package/dist/index.d.ts +163 -22
- package/dist/index.js +1 -1
- package/dist/mockRuntimeCode.js +1 -0
- package/dist/worker.d.ts +86 -30
- package/dist/worker.js +1 -1
- package/package.json +8 -7
- package/dist/770.js +0 -167
- /package/dist/{0~454.js → 0~907.js} +0 -0
- /package/dist/{362.js.LICENSE.txt → 554.js.LICENSE.txt} +0 -0
package/LICENSE.md
CHANGED
|
@@ -943,7 +943,7 @@ Licensed under MIT license in the repository at https://github.com/chaijs/loupe.
|
|
|
943
943
|
|
|
944
944
|
### magic-string
|
|
945
945
|
|
|
946
|
-
Licensed under MIT license in the repository at https://github.com/
|
|
946
|
+
Licensed under MIT license in the repository at git+https://github.com/Rich-Harris/magic-string.git.
|
|
947
947
|
|
|
948
948
|
> Copyright 2018 Rich Harris
|
|
949
949
|
>
|
package/dist/0~122.js
CHANGED
|
@@ -5,8 +5,8 @@ import node_events from "node:events";
|
|
|
5
5
|
import { Tinypool } from "tinypool";
|
|
6
6
|
import node_inspector from "node:inspector";
|
|
7
7
|
import { basename, TEMP_RSTEST_OUTPUT_DIR, dirname, posix, resolve as pathe_M_eThtNZ_resolve, serializableConfig, node_process, isBuiltin, castArray, TEMP_RSTEST_OUTPUT_DIR_GLOB, isDebug, ADDITIONAL_NODE_BUILTINS, join, needFlagExperimentalDetectModule } from "./946.js";
|
|
8
|
-
import { node_v8, fileURLToPath, createBirpc } from "./
|
|
9
|
-
import {
|
|
8
|
+
import { node_v8, fileURLToPath, createBirpc } from "./404.js";
|
|
9
|
+
import { core_logger, createRsbuild } from "./131.js";
|
|
10
10
|
const DefaultMaxHeapSize = 1073741824;
|
|
11
11
|
function memory_isMemorySufficient(options) {
|
|
12
12
|
const { memoryThreshold = 0.7, maxHeapSize = DefaultMaxHeapSize } = options || {};
|
|
@@ -102,7 +102,7 @@ const parseWorkers = (maxWorkers)=>{
|
|
|
102
102
|
return parsed > 0 ? parsed : 1;
|
|
103
103
|
};
|
|
104
104
|
const getRuntimeConfig = (context)=>{
|
|
105
|
-
const { testNamePattern, testTimeout, passWithNoTests, retry, globals, clearMocks, resetMocks, restoreMocks, unstubEnvs, unstubGlobals, maxConcurrency, printConsoleTrace, disableConsoleIntercept, testEnvironment, hookTimeout, isolate, coverage, snapshotFormat, env, logHeapUsage, bail, chaiConfig } = context.normalizedConfig;
|
|
105
|
+
const { testNamePattern, testTimeout, passWithNoTests, retry, globals, clearMocks, resetMocks, restoreMocks, unstubEnvs, unstubGlobals, maxConcurrency, printConsoleTrace, disableConsoleIntercept, testEnvironment, hookTimeout, isolate, coverage, snapshotFormat, env, logHeapUsage, bail, chaiConfig, includeTaskLocation } = context.normalizedConfig;
|
|
106
106
|
return {
|
|
107
107
|
env,
|
|
108
108
|
testNamePattern,
|
|
@@ -125,7 +125,8 @@ const getRuntimeConfig = (context)=>{
|
|
|
125
125
|
snapshotFormat,
|
|
126
126
|
logHeapUsage,
|
|
127
127
|
bail,
|
|
128
|
-
chaiConfig
|
|
128
|
+
chaiConfig,
|
|
129
|
+
includeTaskLocation
|
|
129
130
|
};
|
|
130
131
|
};
|
|
131
132
|
const filterAssetsByEntry = async (entryInfo, getAssetFiles, getSourceMaps, setupAssets)=>{
|
|
@@ -185,6 +186,15 @@ const createPool = async ({ context, recommendWorkerCount = 1 / 0 })=>{
|
|
|
185
186
|
context.stateManager.onTestFileStart(test.testPath);
|
|
186
187
|
await Promise.all(reporters.map((reporter)=>reporter.onTestFileStart?.(test)));
|
|
187
188
|
},
|
|
189
|
+
onTestFileReady: async (test)=>{
|
|
190
|
+
await Promise.all(reporters.map((reporter)=>reporter.onTestFileReady?.(test)));
|
|
191
|
+
},
|
|
192
|
+
onTestSuiteStart: async (test)=>{
|
|
193
|
+
await Promise.all(reporters.map((reporter)=>reporter.onTestSuiteStart?.(test)));
|
|
194
|
+
},
|
|
195
|
+
onTestSuiteResult: async (result)=>{
|
|
196
|
+
await Promise.all(reporters.map((reporter)=>reporter.onTestSuiteResult?.(result)));
|
|
197
|
+
},
|
|
188
198
|
resolveSnapshotPath: (testPath)=>{
|
|
189
199
|
const snapExtension = '.snap';
|
|
190
200
|
const resolver = context.normalizedConfig.resolveSnapshotPath || (()=>join(dirname(testPath), '__snapshots__', `${basename(testPath)}${snapExtension}`));
|
|
@@ -407,7 +417,7 @@ const pluginBasic = (context)=>({
|
|
|
407
417
|
});
|
|
408
418
|
}
|
|
409
419
|
});
|
|
410
|
-
const external_node_path_ = __webpack_require__("
|
|
420
|
+
const external_node_path_ = __webpack_require__("path");
|
|
411
421
|
const PLUGIN_CSS_FILTER = 'rstest:css-filter';
|
|
412
422
|
const css_filter_dirname = external_node_path_["default"].dirname(fileURLToPath(import.meta.url));
|
|
413
423
|
const pluginCSSFilter = ()=>({
|
|
@@ -687,7 +697,7 @@ const isMultiCompiler = (compiler)=>'compilers' in compiler && Array.isArray(com
|
|
|
687
697
|
const prepareRsbuild = async (context, globTestSourceEntries, setupFiles)=>{
|
|
688
698
|
const { command, normalizedConfig: { isolate, dev = {}, coverage } } = context;
|
|
689
699
|
const debugMode = isDebug();
|
|
690
|
-
|
|
700
|
+
core_logger.level = debugMode ? 'verbose' : 'error';
|
|
691
701
|
const writeToDisk = dev.writeToDisk || debugMode;
|
|
692
702
|
const rsbuildInstance = await createRsbuild({
|
|
693
703
|
callerName: 'rstest',
|