@rstest/core 0.6.8 → 0.7.0
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~122.js +5 -3
- package/dist/155.js +4 -3
- package/dist/362.js +3 -6
- package/package.json +2 -2
package/dist/0~122.js
CHANGED
|
@@ -477,7 +477,7 @@ const autoExternalNodeModules = ({ context, request, dependencyType, getResolve
|
|
|
477
477
|
if (!resolver) return callback();
|
|
478
478
|
resolver(context, request, (err, resolvePath)=>{
|
|
479
479
|
if (err) return callback();
|
|
480
|
-
if (resolvePath &&
|
|
480
|
+
if (resolvePath && resolvePath.includes('node_modules') && !/\.(?:ts|tsx|jsx|mts|cts)$/.test(resolvePath)) return doExternal(resolvePath);
|
|
481
481
|
return callback();
|
|
482
482
|
});
|
|
483
483
|
};
|
|
@@ -810,7 +810,8 @@ const createRsbuildServer = async ({ globTestSourceEntries, setupFiles, rsbuildI
|
|
|
810
810
|
const readFile = async (fileName)=>new Promise((resolve, reject)=>{
|
|
811
811
|
outputFileSystem.readFile(fileName, (err, data)=>{
|
|
812
812
|
if (err) reject(err);
|
|
813
|
-
|
|
813
|
+
const content = 'string' == typeof data ? data : fileName.endsWith('.wasm') ? data.toString('base64') : data.toString('utf-8');
|
|
814
|
+
resolve(content);
|
|
814
815
|
});
|
|
815
816
|
});
|
|
816
817
|
const buildData = {};
|
|
@@ -844,7 +845,8 @@ const createRsbuildServer = async ({ globTestSourceEntries, setupFiles, rsbuildI
|
|
|
844
845
|
const sourceEntries = await globTestSourceEntries(environmentName);
|
|
845
846
|
for (const entry of Object.keys(entrypoints)){
|
|
846
847
|
const e = entrypoints[entry];
|
|
847
|
-
const
|
|
848
|
+
const filteredAssets = e.assets.filter((asset)=>!asset.name.endsWith('.wasm'));
|
|
849
|
+
const distPath = posix.join(outputPath, filteredAssets[filteredAssets.length - 1].name);
|
|
848
850
|
if (setupFiles[environmentName][entry]) setupEntries.push({
|
|
849
851
|
distPath,
|
|
850
852
|
testPath: setupFiles[environmentName][entry],
|
package/dist/155.js
CHANGED
|
@@ -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.
|
|
503
|
+
src_logger.greet(" Rstest v0.7.0");
|
|
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.
|
|
547
|
+
cli.version("0.7.0");
|
|
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();
|
|
@@ -2169,6 +2169,7 @@ const stackIgnores = [
|
|
|
2169
2169
|
/node_modules\/@vitest\/snapshot/,
|
|
2170
2170
|
/node:\w+/,
|
|
2171
2171
|
/webpack\/runtime/,
|
|
2172
|
+
/rstest runtime/,
|
|
2172
2173
|
/webpack\\runtime/,
|
|
2173
2174
|
'<anonymous>'
|
|
2174
2175
|
];
|
|
@@ -2427,7 +2428,7 @@ class Rstest {
|
|
|
2427
2428
|
});
|
|
2428
2429
|
this.reporters = reporters;
|
|
2429
2430
|
this.snapshotManager = snapshotManager;
|
|
2430
|
-
this.version = "0.
|
|
2431
|
+
this.version = "0.7.0";
|
|
2431
2432
|
this.rootPath = rootPath;
|
|
2432
2433
|
this.originalConfig = userConfig;
|
|
2433
2434
|
this.normalizedConfig = rstestConfig;
|
package/dist/362.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/*! For license information please see 362.js.LICENSE.txt */
|
|
2
2
|
import __rslib_shim_module__ from 'module';
|
|
3
3
|
const require = /*#__PURE__*/ __rslib_shim_module__.createRequire(import.meta.url);
|
|
4
|
+
"use strict";
|
|
4
5
|
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
5
6
|
import node_vm from "node:vm";
|
|
6
7
|
import { basename, globalApis, posix, external_node_module_createRequire, dirname, resolve as pathe_M_eThtNZ_resolve, undoSerializableConfig, src_logger, isAbsolute, join } from "./946.js";
|
|
@@ -6656,7 +6657,7 @@ const formatTestError = (err, test)=>{
|
|
|
6656
6657
|
message: rawError
|
|
6657
6658
|
} : rawError;
|
|
6658
6659
|
const errObj = {
|
|
6659
|
-
|
|
6660
|
+
fullStack: error.fullStack,
|
|
6660
6661
|
message: error.message,
|
|
6661
6662
|
name: error.name,
|
|
6662
6663
|
stack: error.stack
|
|
@@ -6665,10 +6666,6 @@ const formatTestError = (err, test)=>{
|
|
|
6665
6666
|
if (error.showDiff || void 0 === error.showDiff && void 0 !== error.expected && void 0 !== error.actual) errObj.diff = diff(err.expected, err.actual, {
|
|
6666
6667
|
expand: false
|
|
6667
6668
|
});
|
|
6668
|
-
for (const key of [
|
|
6669
|
-
'actual',
|
|
6670
|
-
'expected'
|
|
6671
|
-
])if ('string' != typeof err[key]) errObj[key] = JSON.stringify(err[key], null, 10);
|
|
6672
6669
|
return errObj;
|
|
6673
6670
|
});
|
|
6674
6671
|
};
|
|
@@ -6852,7 +6849,7 @@ const loadModule = ({ codeContent, distPath, testPath, rstestContext, assetFiles
|
|
|
6852
6849
|
readWasmFile: (wasmPath, callback)=>{
|
|
6853
6850
|
const joinedPath = isRelativePath(wasmPath) ? posix.join(posix.dirname(distPath), wasmPath) : wasmPath;
|
|
6854
6851
|
const content = assetFiles[posix.normalize(joinedPath)];
|
|
6855
|
-
if (content) callback(null, Buffer.from(content, '
|
|
6852
|
+
if (content) callback(null, Buffer.from(content, 'base64'));
|
|
6856
6853
|
else callback(new Error(`WASM file ${joinedPath} not found in asset files.`));
|
|
6857
6854
|
},
|
|
6858
6855
|
__rstest_dynamic_import__: defineRstestDynamicImport({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rstest/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "The Rsbuild-based test tool.",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/web-infra-dev/rstest/issues"
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@types/chai": "^5.2.3",
|
|
50
|
-
"@rsbuild/core": "1.6.
|
|
50
|
+
"@rsbuild/core": "1.6.12-canary-20251204065915",
|
|
51
51
|
"tinypool": "^1.1.1"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|