@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 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/rich-harris/magic-string.git.
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 "./770.js";
9
- import { logger, createRsbuild } from "./155.js";
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__("node:path");
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
- logger.level = debugMode ? 'verbose' : 'error';
700
+ core_logger.level = debugMode ? 'verbose' : 'error';
691
701
  const writeToDisk = dev.writeToDisk || debugMode;
692
702
  const rsbuildInstance = await createRsbuild({
693
703
  callerName: 'rstest',