@rstest/core 0.6.2 → 0.6.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/dist/0~171.js +1 -1
- package/dist/0~263.js +1 -1
- package/dist/0~350.js +1 -2
- package/dist/0~365.js +1 -1
- package/dist/0~470.js +8 -2
- package/dist/0~607.js +1 -1
- package/dist/0~691.js +1 -1
- package/dist/0~711.js +1 -2
- package/dist/0~764.js +1 -1
- package/dist/0~814.js +1 -1
- package/dist/0~836.js +1 -1
- package/dist/0~971.js +1 -1
- package/dist/603.js +1 -1
- package/dist/857.js +1 -1
- package/dist/index.js +4 -4
- package/dist/worker.js +2 -7
- package/package.json +2 -2
- package/dist/0~535.js +0 -10
- package/dist/0~610.js +0 -10
- package/dist/0~673.js +0 -10
- package/dist/0~763.js +0 -10
- /package/dist/{runtime.js → rslib-runtime.js} +0 -0
package/dist/0~171.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'module';
|
|
2
2
|
/*#__PURE__*/ import.meta.url;
|
|
3
|
-
import { __webpack_require__ } from "./runtime.js";
|
|
3
|
+
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
4
4
|
import "./857.js";
|
|
5
5
|
__webpack_require__.add({
|
|
6
6
|
"../../node_modules/.pnpm/js-tokens@4.0.0/node_modules/js-tokens/index.js": function(__unused_webpack_module, exports) {
|
package/dist/0~263.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! For license information please see 0~263.js.LICENSE.txt */
|
|
2
2
|
import 'module';
|
|
3
3
|
/*#__PURE__*/ import.meta.url;
|
|
4
|
-
import { __webpack_require__ } from "./runtime.js";
|
|
4
|
+
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
5
5
|
import { lstat, open as promises_open, readdir, realpath as promises_realpath, stat as promises_stat } from "fs/promises";
|
|
6
6
|
import { Readable } from "node:stream";
|
|
7
7
|
import { readdir as promises_readdir, lstat as promises_lstat, promises_stat as promises_promises_stat, realpath as external_node_fs_promises_realpath } from "./857.js";
|
package/dist/0~350.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import 'module';
|
|
2
2
|
/*#__PURE__*/ import.meta.url;
|
|
3
|
-
import { __webpack_require__ } from "./runtime.js";
|
|
4
3
|
import { checkPkgInstalled } from "./worker.js";
|
|
5
4
|
import { installGlobal, addDefaultErrorHandler } from "./0~463.js";
|
|
6
5
|
const environment = {
|
|
7
6
|
name: 'happy-dom',
|
|
8
7
|
async setup (global, { happyDom = {} }) {
|
|
9
8
|
checkPkgInstalled('happy-dom');
|
|
10
|
-
const { Window } = await import("
|
|
9
|
+
const { Window } = await import("happy-dom");
|
|
11
10
|
const win = new Window({
|
|
12
11
|
...happyDom,
|
|
13
12
|
url: happyDom.url || 'http://localhost:3000',
|
package/dist/0~365.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'module';
|
|
2
2
|
/*#__PURE__*/ import.meta.url;
|
|
3
|
-
import { __webpack_require__ } from "./runtime.js";
|
|
3
|
+
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
4
4
|
import { src_logger, isTTY } from "./857.js";
|
|
5
5
|
import { runRest } from "./index.js";
|
|
6
6
|
const GLOB_REGEX = /[*?{}[\]()!@+|]/;
|
package/dist/0~470.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'module';
|
|
2
2
|
/*#__PURE__*/ import.meta.url;
|
|
3
|
-
import { __webpack_require__ } from "./runtime.js";
|
|
3
|
+
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
4
4
|
import { getTestEntries, getSetupFiles, isTTY, clearScreen, src_logger } from "./857.js";
|
|
5
5
|
import { createCoverageProvider } from "./603.js";
|
|
6
6
|
import { prepareRsbuild, createPool, createRsbuildServer } from "./0~814.js";
|
|
@@ -8,7 +8,7 @@ const picocolors = __webpack_require__("../../node_modules/.pnpm/picocolors@1.1.
|
|
|
8
8
|
var picocolors_default = /*#__PURE__*/ __webpack_require__.n(picocolors);
|
|
9
9
|
const isCliShortcutsEnabled = ()=>isTTY('stdin');
|
|
10
10
|
async function setupCliShortcuts({ closeServer, runAll, updateSnapshot, runFailedTests, runWithTestNamePattern, runWithFileFilters }) {
|
|
11
|
-
const { createInterface, emitKeypressEvents } = await import("
|
|
11
|
+
const { createInterface, emitKeypressEvents } = await import("node:readline");
|
|
12
12
|
const rl = createInterface({
|
|
13
13
|
input: process.stdin,
|
|
14
14
|
output: process.stdout
|
|
@@ -374,9 +374,15 @@ async function runTests(context) {
|
|
|
374
374
|
afterTestsWatchRun();
|
|
375
375
|
});
|
|
376
376
|
} else {
|
|
377
|
+
const unExpectedExit = (code)=>{
|
|
378
|
+
src_logger.log(picocolors_default().red(`Rstest exited unexpectedly with code ${code}, terminating test run.`));
|
|
379
|
+
process.exitCode = 1;
|
|
380
|
+
};
|
|
381
|
+
process.on('exit', unExpectedExit);
|
|
377
382
|
await run();
|
|
378
383
|
await pool.close();
|
|
379
384
|
await closeServer();
|
|
385
|
+
process.off('exit', unExpectedExit);
|
|
380
386
|
}
|
|
381
387
|
}
|
|
382
388
|
export { runTests };
|
package/dist/0~607.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'module';
|
|
2
2
|
/*#__PURE__*/ import.meta.url;
|
|
3
|
-
import { __webpack_require__ } from "./runtime.js";
|
|
3
|
+
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
4
4
|
import { AssertionError, strict } from "node:assert";
|
|
5
5
|
import { Console } from "node:console";
|
|
6
6
|
import { prettyTime } from "./857.js";
|
package/dist/0~691.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'module';
|
|
2
2
|
/*#__PURE__*/ import.meta.url;
|
|
3
|
-
import { __webpack_require__ } from "./runtime.js";
|
|
3
|
+
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
4
4
|
import { pathe_M_eThtNZ_relative } from "./857.js";
|
|
5
5
|
const picomatch = __webpack_require__("../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/index.js");
|
|
6
6
|
var picomatch_default = /*#__PURE__*/ __webpack_require__.n(picomatch);
|
package/dist/0~711.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import 'module';
|
|
2
2
|
/*#__PURE__*/ import.meta.url;
|
|
3
|
-
import { __webpack_require__ } from "./runtime.js";
|
|
4
3
|
import { checkPkgInstalled } from "./worker.js";
|
|
5
4
|
import { installGlobal, addDefaultErrorHandler } from "./0~463.js";
|
|
6
5
|
const environment = {
|
|
7
6
|
name: 'jsdom',
|
|
8
7
|
async setup (global, { jsdom = {} }) {
|
|
9
8
|
checkPkgInstalled('jsdom');
|
|
10
|
-
const { CookieJar, JSDOM, ResourceLoader, VirtualConsole } = await import("
|
|
9
|
+
const { CookieJar, JSDOM, ResourceLoader, VirtualConsole } = await import("jsdom");
|
|
11
10
|
const { html = '<!DOCTYPE html>', userAgent, url = 'http://localhost:3000', contentType = 'text/html', pretendToBeVisual = true, includeNodeLocations = false, runScripts = 'dangerously', resources, console = false, cookieJar = false, ...restOptions } = jsdom;
|
|
12
11
|
const dom = new JSDOM(html, {
|
|
13
12
|
pretendToBeVisual,
|
package/dist/0~764.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! For license information please see 0~764.js.LICENSE.txt */
|
|
2
2
|
import 'module';
|
|
3
3
|
/*#__PURE__*/ import.meta.url;
|
|
4
|
-
import { __webpack_require__ } from "./runtime.js";
|
|
4
|
+
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
5
5
|
import { getTaskNameWithPrefix, isObject as helper_isObject, castArray, resolve as pathe_M_eThtNZ_resolve, ROOT_SUITE_NAME } from "./857.js";
|
|
6
6
|
import { getRealTimers, TestRegisterError, formatTestError, formatName } from "./worker.js";
|
|
7
7
|
__webpack_require__.add({
|
package/dist/0~814.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'module';
|
|
2
2
|
/*#__PURE__*/ import.meta.url;
|
|
3
|
-
import { __webpack_require__ } from "./runtime.js";
|
|
3
|
+
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
4
4
|
import node_events from "node:events";
|
|
5
5
|
import { Tinypool } from "tinypool";
|
|
6
6
|
import node_inspector from "node:inspector";
|
package/dist/0~836.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'module';
|
|
2
2
|
/*#__PURE__*/ import.meta.url;
|
|
3
|
-
import { __webpack_require__ } from "./runtime.js";
|
|
3
|
+
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
4
4
|
import "./857.js";
|
|
5
5
|
const external_node_fs_ = __webpack_require__("node:fs");
|
|
6
6
|
const pluginCoverageCore = (coverageOptions)=>({
|
package/dist/0~971.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'module';
|
|
2
2
|
/*#__PURE__*/ import.meta.url;
|
|
3
|
-
import { __webpack_require__ } from "./runtime.js";
|
|
3
|
+
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
4
4
|
import { getTestEntries, getSetupFiles, getTaskNameWithPrefix, prettyTestPath, src_logger } from "./857.js";
|
|
5
5
|
import { prepareRsbuild, createPool, createRsbuildServer } from "./0~814.js";
|
|
6
6
|
const external_node_fs_ = __webpack_require__("node:fs");
|
package/dist/603.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'module';
|
|
2
2
|
/*#__PURE__*/ import.meta.url;
|
|
3
|
-
import { __webpack_require__ } from "./runtime.js";
|
|
3
|
+
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
4
4
|
import { external_node_module_createRequire } from "./857.js";
|
|
5
5
|
import { pathToFileURL } from "./808.js";
|
|
6
6
|
const picocolors = __webpack_require__("../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
|
package/dist/857.js
CHANGED
|
@@ -5,7 +5,7 @@ import * as __WEBPACK_EXTERNAL_MODULE_node_os_74b4b876__ from "node:os";
|
|
|
5
5
|
import * as __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__ from "node:path";
|
|
6
6
|
import * as __WEBPACK_EXTERNAL_MODULE_node_tty_c64aab7e__ from "node:tty";
|
|
7
7
|
import * as __WEBPACK_EXTERNAL_MODULE_node_util_1b29d436__ from "node:util";
|
|
8
|
-
import { __webpack_require__ } from "./runtime.js";
|
|
8
|
+
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
9
9
|
import node_process from "node:process";
|
|
10
10
|
import { fileURLToPath } from "url";
|
|
11
11
|
import { createRequire } from "module";
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'module';
|
|
2
2
|
/*#__PURE__*/ import.meta.url;
|
|
3
|
-
import { __webpack_require__ } from "./runtime.js";
|
|
3
|
+
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
4
4
|
import { EventEmitter } from "events";
|
|
5
5
|
import { createRsbuild, loadConfig, logger, mergeRsbuildConfig } from "@rsbuild/core";
|
|
6
6
|
import { basename, DEFAULT_CONFIG_EXTENSIONS, TS_CONFIG_FILE, DEFAULT_CONFIG_NAME, dirname, posix, resolve as pathe_M_eThtNZ_resolve, pathe_M_eThtNZ_relative, globalApis, formatTestPath, getAbsolutePath, filterProjects, formatRootStr, join, isDynamicPattern, glob, writeFile, castArray, src_logger, prettyTestPath, prettyTime, isDebug, isAbsolute, getTaskNameWithPrefix, formatError, normalize, TEMP_RSTEST_OUTPUT_DIR_GLOB } from "./857.js";
|
|
@@ -500,7 +500,7 @@ function prepareCli() {
|
|
|
500
500
|
if (!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) console.log();
|
|
501
501
|
}
|
|
502
502
|
function showRstest() {
|
|
503
|
-
src_logger.greet(" Rstest v0.6.
|
|
503
|
+
src_logger.greet(" Rstest v0.6.3");
|
|
504
504
|
src_logger.log('');
|
|
505
505
|
}
|
|
506
506
|
const applyCommonOptions = (cli)=>{
|
|
@@ -544,7 +544,7 @@ const runRest = async ({ options, filters, command })=>{
|
|
|
544
544
|
function setupCommands() {
|
|
545
545
|
const cli = dist('rstest');
|
|
546
546
|
cli.help();
|
|
547
|
-
cli.version("0.6.
|
|
547
|
+
cli.version("0.6.3");
|
|
548
548
|
applyCommonOptions(cli);
|
|
549
549
|
cli.command('[...filters]', 'run tests').option('-w, --watch', 'Run tests in watch mode').action(async (filters, options)=>{
|
|
550
550
|
showRstest();
|
|
@@ -2347,7 +2347,7 @@ class Rstest {
|
|
|
2347
2347
|
});
|
|
2348
2348
|
this.reporters = reporters;
|
|
2349
2349
|
this.snapshotManager = snapshotManager;
|
|
2350
|
-
this.version = "0.6.
|
|
2350
|
+
this.version = "0.6.3";
|
|
2351
2351
|
this.rootPath = rootPath;
|
|
2352
2352
|
this.originalConfig = userConfig;
|
|
2353
2353
|
this.normalizedConfig = rstestConfig;
|
package/dist/worker.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! For license information please see worker.js.LICENSE.txt */
|
|
2
2
|
import __rslib_shim_module__ from 'module';
|
|
3
3
|
const require = /*#__PURE__*/ __rslib_shim_module__.createRequire(import.meta.url);
|
|
4
|
-
import { __webpack_require__ } from "./runtime.js";
|
|
4
|
+
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
5
5
|
import node_vm from "node:vm";
|
|
6
6
|
import { basename, globalApis, posix, external_node_module_createRequire, dirname, resolve as pathe_M_eThtNZ_resolve, undoSerializableConfig, src_logger, isAbsolute, join } from "./857.js";
|
|
7
7
|
import { node_v8, pathToFileURL, createBirpc } from "./808.js";
|
|
@@ -6737,7 +6737,7 @@ function interopModule(mod) {
|
|
|
6737
6737
|
};
|
|
6738
6738
|
}
|
|
6739
6739
|
const asModule = async (something, defaultExport, context, unlinked)=>{
|
|
6740
|
-
const { Module, SyntheticModule } = await import("
|
|
6740
|
+
const { Module, SyntheticModule } = await import("node:vm");
|
|
6741
6741
|
if (something instanceof Module) return something;
|
|
6742
6742
|
const exports = [
|
|
6743
6743
|
...new Set([
|
|
@@ -7127,9 +7127,6 @@ const loadFiles = async ({ setupEntries, assetFiles, rstestContext, distPath, te
|
|
|
7127
7127
|
interopDefault
|
|
7128
7128
|
});
|
|
7129
7129
|
};
|
|
7130
|
-
const onExit = ()=>{
|
|
7131
|
-
process.exit();
|
|
7132
|
-
};
|
|
7133
7130
|
const runInPool = async (options)=>{
|
|
7134
7131
|
isTeardown = false;
|
|
7135
7132
|
const { entryInfo: { distPath, testPath }, setupEntries, assets, type, context: { project, runtimeConfig: { isolate } } } = options;
|
|
@@ -7147,12 +7144,10 @@ const runInPool = async (options)=>{
|
|
|
7147
7144
|
process.kill = kill;
|
|
7148
7145
|
process.exit = exit;
|
|
7149
7146
|
});
|
|
7150
|
-
process.off('SIGTERM', onExit);
|
|
7151
7147
|
const teardown = async ()=>{
|
|
7152
7148
|
await new Promise((resolve)=>getRealTimers().setTimeout(resolve));
|
|
7153
7149
|
await Promise.all(cleanups.map((fn)=>fn()));
|
|
7154
7150
|
isTeardown = true;
|
|
7155
|
-
process.once('SIGTERM', onExit);
|
|
7156
7151
|
};
|
|
7157
7152
|
if ('collect' === type) try {
|
|
7158
7153
|
const { rstestContext, runner, rpc, cleanup, unhandledErrors, interopDefault } = await preparePool(options);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rstest/core",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
4
4
|
"description": "The Rsbuild-based test tool.",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/web-infra-dev/rstest/issues"
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@babel/code-frame": "^7.27.1",
|
|
61
61
|
"@jridgewell/trace-mapping": "0.3.31",
|
|
62
62
|
"@microsoft/api-extractor": "^7.53.3",
|
|
63
|
-
"@rslib/core": "0.17.
|
|
63
|
+
"@rslib/core": "0.17.1",
|
|
64
64
|
"@sinonjs/fake-timers": "^14.0.0",
|
|
65
65
|
"@types/babel__code-frame": "^7.0.6",
|
|
66
66
|
"@types/istanbul-reports": "^3.0.4",
|
package/dist/0~535.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import 'module';
|
|
2
|
-
/*#__PURE__*/ import.meta.url;
|
|
3
|
-
import { __webpack_require__ } from "./runtime.js";
|
|
4
|
-
__webpack_require__.add({
|
|
5
|
-
"node:vm?8d7d": function(module) {
|
|
6
|
-
module.exports = import("node:vm").then(function(module) {
|
|
7
|
-
return module;
|
|
8
|
-
});
|
|
9
|
-
}
|
|
10
|
-
});
|
package/dist/0~610.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import 'module';
|
|
2
|
-
/*#__PURE__*/ import.meta.url;
|
|
3
|
-
import { __webpack_require__ } from "./runtime.js";
|
|
4
|
-
__webpack_require__.add({
|
|
5
|
-
"node:readline": function(module) {
|
|
6
|
-
module.exports = import("node:readline").then(function(module) {
|
|
7
|
-
return module;
|
|
8
|
-
});
|
|
9
|
-
}
|
|
10
|
-
});
|
package/dist/0~673.js
DELETED
package/dist/0~763.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import 'module';
|
|
2
|
-
/*#__PURE__*/ import.meta.url;
|
|
3
|
-
import { __webpack_require__ } from "./runtime.js";
|
|
4
|
-
__webpack_require__.add({
|
|
5
|
-
"happy-dom": function(module) {
|
|
6
|
-
module.exports = import("happy-dom").then(function(module) {
|
|
7
|
-
return module;
|
|
8
|
-
});
|
|
9
|
-
}
|
|
10
|
-
});
|
|
File without changes
|