@rstest/core 0.6.9 → 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 CHANGED
@@ -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
- resolve('string' == typeof data ? data : data.toString());
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 distPath = posix.join(outputPath, e.assets[e.assets.length - 1].name);
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.6.9");
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.6.9");
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.6.9";
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";
@@ -6848,7 +6849,7 @@ const loadModule = ({ codeContent, distPath, testPath, rstestContext, assetFiles
6848
6849
  readWasmFile: (wasmPath, callback)=>{
6849
6850
  const joinedPath = isRelativePath(wasmPath) ? posix.join(posix.dirname(distPath), wasmPath) : wasmPath;
6850
6851
  const content = assetFiles[posix.normalize(joinedPath)];
6851
- if (content) callback(null, Buffer.from(content, 'utf-8'));
6852
+ if (content) callback(null, Buffer.from(content, 'base64'));
6852
6853
  else callback(new Error(`WASM file ${joinedPath} not found in asset files.`));
6853
6854
  },
6854
6855
  __rstest_dynamic_import__: defineRstestDynamicImport({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rstest/core",
3
- "version": "0.6.9",
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.0-beta.1",
50
+ "@rsbuild/core": "1.6.12-canary-20251204065915",
51
51
  "tinypool": "^1.1.1"
52
52
  },
53
53
  "devDependencies": {