@rstest/core 0.9.1 → 0.9.2

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.
Files changed (48) hide show
  1. package/dist/{0~89.js → 0~8843.js} +20 -24
  2. package/dist/{0~1472.js → 0~browserLoader.js} +5 -5
  3. package/dist/{0~7882.js → 0~browser~1.js} +32 -33
  4. package/dist/{0~8426.js → 0~checkThresholds.js} +2 -2
  5. package/dist/{0~130.js → 0~console.js} +15 -16
  6. package/dist/{0~9744.js → 0~dist.js} +57 -57
  7. package/dist/{0~7583.js → 0~esm.js} +66 -68
  8. package/dist/{0~4403.js → 0~generate.js} +5 -6
  9. package/dist/{0~4809.js → 0~happyDom.js} +2 -2
  10. package/dist/{0~3346.js → 0~interop.js} +0 -1
  11. package/dist/{0~62.js → 0~jsdom.js} +2 -2
  12. package/dist/{0~262.js → 0~lib.js} +4 -1
  13. package/dist/{0~9634.js → 0~listTests.js} +14 -23
  14. package/dist/{0~6923.js → 0~loadEsModule.js} +7 -7
  15. package/dist/{0~5835.js → 0~loadModule.js} +11 -11
  16. package/dist/{0~6907.js → 0~magic-string.es.js} +2 -1
  17. package/dist/{0~2255.js → 0~plugin.js} +2 -4
  18. package/dist/{0~6588.js → 0~restart.js} +7 -11
  19. package/dist/{0~2173.js → 0~runTests.js} +11 -20
  20. package/dist/{487.js → 1255.js} +22 -15
  21. package/dist/{6151.js → 1949.js} +15 -15
  22. package/dist/{6973.js → 255.js} +7 -8
  23. package/dist/{9131.js → 3145.js} +75 -404
  24. package/dist/{1157.js → 4411.js} +35 -35
  25. package/dist/{4484.js → 5040.js} +1 -2
  26. package/dist/{3160.js → 6830.js} +389 -81
  27. package/dist/7011.js +1 -1
  28. package/dist/{1294.js → 7552.js} +28 -22
  29. package/dist/{5734.js → 7704.js} +6 -5
  30. package/dist/browser-runtime/{2~907.js → 2~magic-string.es.js} +18 -11
  31. package/dist/browser-runtime/{389.js → 723.js} +39 -44
  32. package/dist/browser-runtime/{389.js.LICENSE.txt → 723.js.LICENSE.txt} +0 -22
  33. package/dist/browser-runtime/index.js +1 -1
  34. package/dist/browser-runtime/rslib-runtime.js +11 -3
  35. package/dist/browser.js +9 -7
  36. package/dist/globalSetupWorker.js +4 -13
  37. package/dist/index.js +2 -2
  38. package/dist/rslib-runtime.js +5 -8
  39. package/dist/worker.js +19 -45
  40. package/package.json +6 -6
  41. package/dist/3160.js.LICENSE.txt +0 -21
  42. package/dist/4881.js +0 -2
  43. package/dist/6198.js +0 -2
  44. /package/dist/{0~7583.js.LICENSE.txt → 0~esm.js.LICENSE.txt} +0 -0
  45. /package/dist/{0~3062.js → 0~utils.js} +0 -0
  46. /package/dist/{6151.js.LICENSE.txt → 1949.js.LICENSE.txt} +0 -0
  47. /package/dist/{4597.js → 1983.js} +0 -0
  48. /package/dist/{1294.js.LICENSE.txt → 7552.js.LICENSE.txt} +0 -0
@@ -1,15 +1,18 @@
1
1
  import "node:module";
2
- import { __webpack_require__ } from "./rslib-runtime.js";
2
+ import node_os from "node:os";
3
+ import { fileURLToPath } from "node:url";
4
+ import node_process from "node:process";
3
5
  import node_events from "node:events";
4
6
  import { Tinypool } from "tinypool";
7
+ import { createRsbuild, logger } from "@rsbuild/core";
8
+ import node_path from "node:path";
9
+ import { isBuiltin } from "node:module";
5
10
  import node_inspector from "node:inspector";
6
- import { basename, bgColor, isDeno, dirname, castArray, resolve as pathe_M_eThtNZ_resolve, node_process, isDebug, color, getForceColorEnv, ADDITIONAL_NODE_BUILTINS, join, needFlagExperimentalDetectModule } from "./3160.js";
7
- import { fileURLToPath } from "./6198.js";
8
- import { parseWorkerMetaMessage, createBirpc } from "./4597.js";
9
- import { TEMP_RSTEST_OUTPUT_DIR, TEMP_RSTEST_OUTPUT_DIR_GLOB } from "./1157.js";
11
+ import node_fs from "node:fs";
12
+ import { basename, bgColor, isDeno, dirname, castArray, resolve as pathe_M_eThtNZ_resolve, isDebug, color, getForceColorEnv, ADDITIONAL_NODE_BUILTINS, needFlagExperimentalDetectModule, join } from "./6830.js";
13
+ import { parseWorkerMetaMessage, createBirpc } from "./1983.js";
14
+ import { TEMP_RSTEST_OUTPUT_DIR, TEMP_RSTEST_OUTPUT_DIR_GLOB } from "./4411.js";
10
15
  import { posix } from "./7011.js";
11
- import { isBuiltin } from "./4881.js";
12
- import { rsbuild as __rspack_external__rsbuild_core_1b356efc } from "./4484.js";
13
16
  const DefaultMaxHeapSize = 1073741824;
14
17
  function memory_isMemorySufficient(options) {
15
18
  const { memoryThreshold = 0.7, maxHeapSize = DefaultMaxHeapSize } = options || {};
@@ -292,8 +295,7 @@ const createForksPool = (poolOptions)=>{
292
295
  }
293
296
  };
294
297
  };
295
- const external_node_os_ = __webpack_require__("node:os");
296
- const getNumCpus = ()=>external_node_os_["default"].availableParallelism?.() ?? external_node_os_["default"].cpus().length;
298
+ const getNumCpus = ()=>node_os.availableParallelism?.() ?? node_os.cpus().length;
297
299
  const parseWorkers = (maxWorkers)=>{
298
300
  const parsed = Number.parseInt(maxWorkers.toString(), 10);
299
301
  if ('string' == typeof maxWorkers && maxWorkers.trim().endsWith('%')) {
@@ -601,7 +603,6 @@ async function runGlobalTeardown() {
601
603
  process.exitCode = 1;
602
604
  }
603
605
  }
604
- const external_node_path_ = __webpack_require__("path");
605
606
  const RUNTIME_CHUNK_NAME = 'runtime';
606
607
  const requireShim = `// Rstest ESM shims
607
608
  import __rstest_shim_module__ from 'node:module';
@@ -648,7 +649,7 @@ const pluginBasic = (context)=>({
648
649
  },
649
650
  tools: {
650
651
  rspack: (config, { isProd, rspack })=>{
651
- config.context = external_node_path_["default"].resolve(rootPath);
652
+ config.context = node_path.resolve(rootPath);
652
653
  config.mode = isProd ? 'production' : 'development';
653
654
  config.output ??= {};
654
655
  config.output.iife = false;
@@ -719,7 +720,7 @@ const pluginBasic = (context)=>({
719
720
  }
720
721
  });
721
722
  const PLUGIN_CSS_FILTER = 'rstest:css-filter';
722
- const css_filter_dirname = external_node_path_["default"].dirname(fileURLToPath(import.meta.url));
723
+ const css_filter_dirname = node_path.dirname(fileURLToPath(import.meta.url));
723
724
  const pluginCSSFilter = ()=>({
724
725
  name: PLUGIN_CSS_FILTER,
725
726
  setup (api) {
@@ -757,7 +758,7 @@ const pluginCSSFilter = ()=>({
757
758
  importLoaders: (cssLoaderOptions.importLoaders || 0) + 1
758
759
  };
759
760
  rule.use(CHAIN_ID.USE.CSS).options(clonedOptions);
760
- rule.use('rstest-css-pre-filter').loader(external_node_path_["default"].join(css_filter_dirname, 'cssFilterLoader.mjs')).options({
761
+ rule.use('rstest-css-pre-filter').loader(node_path.join(css_filter_dirname, 'cssFilterLoader.mjs')).options({
761
762
  modules: cssLoaderOptions.modules
762
763
  }).after(mainId);
763
764
  }
@@ -900,8 +901,7 @@ const pluginInspect = (options)=>{
900
901
  }
901
902
  } : null;
902
903
  };
903
- const external_node_fs_ = __webpack_require__("node:fs");
904
- const mockRuntime_dirname = external_node_path_["default"].dirname(fileURLToPath(import.meta.url));
904
+ const mockRuntime_dirname = node_path.dirname(fileURLToPath(import.meta.url));
905
905
  class MockRuntimeRspackPlugin {
906
906
  outputModule;
907
907
  constructor(outputModule){
@@ -914,7 +914,7 @@ class MockRuntimeRspackPlugin {
914
914
  super('rstest runtime');
915
915
  }
916
916
  generate() {
917
- const code = external_node_fs_["default"].readFileSync(external_node_path_["default"].join(mockRuntime_dirname, './mockRuntimeCode.js'), 'utf8');
917
+ const code = node_fs.readFileSync(node_path.join(mockRuntime_dirname, './mockRuntimeCode.js'), 'utf8');
918
918
  return code;
919
919
  }
920
920
  }
@@ -1021,9 +1021,9 @@ const prepareRsbuild = async (context, globTestSourceEntries, setupFiles, global
1021
1021
  const { command, normalizedConfig: { isolate, dev = {}, coverage, pool } } = context;
1022
1022
  const projects = context.projects.filter((project)=>!project.normalizedConfig.browser.enabled);
1023
1023
  const debugMode = isDebug();
1024
- __rspack_external__rsbuild_core_1b356efc.logger.level = debugMode ? 'verbose' : 'error';
1024
+ logger.level = debugMode ? 'verbose' : 'error';
1025
1025
  const writeToDisk = dev.writeToDisk || debugMode;
1026
- const rsbuildInstance = await (0, __rspack_external__rsbuild_core_1b356efc.createRsbuild)({
1026
+ const rsbuildInstance = await createRsbuild({
1027
1027
  callerName: 'rstest',
1028
1028
  config: {
1029
1029
  root: context.rootPath,
@@ -1073,12 +1073,8 @@ const prepareRsbuild = async (context, globTestSourceEntries, setupFiles, global
1073
1073
  }
1074
1074
  });
1075
1075
  if (coverage?.enabled && 'list' !== command) {
1076
- const { loadCoverageProvider } = await import("./5734.js").then((mod)=>({
1077
- loadCoverageProvider: mod.loadCoverageProvider
1078
- }));
1079
- const { pluginCoverageCore } = await import("./0~2255.js").then((mod)=>({
1080
- pluginCoverageCore: mod.pluginCoverageCore
1081
- }));
1076
+ const { loadCoverageProvider } = await import("./7704.js");
1077
+ const { pluginCoverageCore } = await import("./0~plugin.js");
1082
1078
  const { pluginCoverage } = await loadCoverageProvider(coverage, context.rootPath);
1083
1079
  coverage.exclude.push(...Object.values(setupFiles).flatMap((files)=>Object.values(files)), ...Object.values(globalSetupFiles || {}).flatMap((files)=>Object.values(files)));
1084
1080
  rsbuildInstance.addPlugins([
@@ -1,10 +1,10 @@
1
1
  import "node:module";
2
- import { createRequire } from "./4881.js";
3
- import { pathToFileURL } from "./6198.js";
4
- import "./1157.js";
5
- import { logger as logger_logger, color } from "./3160.js";
2
+ import { createRequire } from "node:module";
3
+ import { pathToFileURL } from "node:url";
4
+ import "./4411.js";
5
+ import { logger as logger_logger, color } from "./6830.js";
6
6
  async function loadBrowserModule(options = {}) {
7
- const coreVersion = "0.9.1";
7
+ const coreVersion = "0.9.2";
8
8
  const { projectRoots = [] } = options;
9
9
  let browserModule;
10
10
  let browserVersion;
@@ -1,41 +1,40 @@
1
1
  import "node:module";
2
- import { __webpack_require__ } from "./rslib-runtime.js";
3
- import { determineAgent, color } from "./3160.js";
4
- import { detect, resolveCommand } from "./9131.js";
5
- import { Rt, dist_Wt, dist_Vt, R, Jt, be, Nt, Ct, Gt } from "./0~9744.js";
6
- import "./1157.js";
7
- const external_node_fs_ = __webpack_require__("node:fs");
8
- const external_node_path_ = __webpack_require__("path");
2
+ import node_path from "node:path";
3
+ import node_fs from "node:fs";
4
+ import { detect, resolveCommand } from "./3145.js";
5
+ import { confirm as Rt, intro as dist_Wt, log as R, note as dist_Vt, outro as Gt, cancel as Nt, isCancel as Ct, spinner as be, select as Jt } from "./0~dist.js";
6
+ import "./4411.js";
7
+ import { determineAgent, color } from "./6830.js";
9
8
  function getUniqueBaseName(dir, baseName, ext) {
10
- const fullPath = external_node_path_["default"].join(dir, `${baseName}${ext}`);
11
- if (!external_node_fs_["default"].existsSync(fullPath)) return baseName;
9
+ const fullPath = node_path.join(dir, `${baseName}${ext}`);
10
+ if (!node_fs.existsSync(fullPath)) return baseName;
12
11
  let suffix = 1;
13
- while(external_node_fs_["default"].existsSync(external_node_path_["default"].join(dir, `${baseName}_${suffix}${ext}`)))suffix++;
12
+ while(node_fs.existsSync(node_path.join(dir, `${baseName}_${suffix}${ext}`)))suffix++;
14
13
  return `${baseName}_${suffix}`;
15
14
  }
16
15
  function ensureDir(dir) {
17
- if (!external_node_fs_["default"].existsSync(dir)) external_node_fs_["default"].mkdirSync(dir, {
16
+ if (!node_fs.existsSync(dir)) node_fs.mkdirSync(dir, {
18
17
  recursive: true
19
18
  });
20
19
  }
21
20
  function writeFile(filePath, content) {
22
- external_node_fs_["default"].writeFileSync(filePath, content, 'utf-8');
21
+ node_fs.writeFileSync(filePath, content, 'utf-8');
23
22
  }
24
23
  function readPackageJson(cwd) {
25
- const pkgPath = external_node_path_["default"].join(cwd, 'package.json');
26
- if (!external_node_fs_["default"].existsSync(pkgPath)) return null;
24
+ const pkgPath = node_path.join(cwd, 'package.json');
25
+ if (!node_fs.existsSync(pkgPath)) return null;
27
26
  try {
28
- const content = external_node_fs_["default"].readFileSync(pkgPath, 'utf-8');
27
+ const content = node_fs.readFileSync(pkgPath, 'utf-8');
29
28
  return JSON.parse(content);
30
29
  } catch {
31
30
  return null;
32
31
  }
33
32
  }
34
33
  function updatePackageJsonScripts(cwd, scripts) {
35
- const pkgPath = external_node_path_["default"].join(cwd, 'package.json');
34
+ const pkgPath = node_path.join(cwd, 'package.json');
36
35
  let pkg;
37
- if (external_node_fs_["default"].existsSync(pkgPath)) {
38
- const content = external_node_fs_["default"].readFileSync(pkgPath, 'utf-8');
36
+ if (node_fs.existsSync(pkgPath)) {
37
+ const content = node_fs.readFileSync(pkgPath, 'utf-8');
39
38
  pkg = JSON.parse(content);
40
39
  } else pkg = {};
41
40
  const existingScripts = pkg.scripts ?? {};
@@ -43,19 +42,19 @@ function updatePackageJsonScripts(cwd, scripts) {
43
42
  ...existingScripts,
44
43
  ...scripts
45
44
  };
46
- external_node_fs_["default"].writeFileSync(pkgPath, `${JSON.stringify(pkg, null, 2)}\n`, 'utf-8');
45
+ node_fs.writeFileSync(pkgPath, `${JSON.stringify(pkg, null, 2)}\n`, 'utf-8');
47
46
  }
48
47
  function updatePackageJsonDevDeps(cwd, deps) {
49
- const pkgPath = external_node_path_["default"].join(cwd, 'package.json');
48
+ const pkgPath = node_path.join(cwd, 'package.json');
50
49
  let pkg;
51
- if (external_node_fs_["default"].existsSync(pkgPath)) {
52
- const content = external_node_fs_["default"].readFileSync(pkgPath, 'utf-8');
50
+ if (node_fs.existsSync(pkgPath)) {
51
+ const content = node_fs.readFileSync(pkgPath, 'utf-8');
53
52
  pkg = JSON.parse(content);
54
53
  } else pkg = {};
55
54
  const existingDevDeps = pkg.devDependencies ?? {};
56
55
  for (const [name, version] of Object.entries(deps))if (!existingDevDeps[name]) existingDevDeps[name] = version;
57
56
  pkg.devDependencies = existingDevDeps;
58
- external_node_fs_["default"].writeFileSync(pkgPath, `${JSON.stringify(pkg, null, 2)}\n`, 'utf-8');
57
+ node_fs.writeFileSync(pkgPath, `${JSON.stringify(pkg, null, 2)}\n`, 'utf-8');
59
58
  }
60
59
  async function detectPackageManagerAgent(cwd) {
61
60
  const result = await detect({
@@ -71,8 +70,8 @@ function detectTestDir(cwd) {
71
70
  'src/__tests__'
72
71
  ];
73
72
  for (const dir of candidates){
74
- const fullPath = external_node_path_["default"].join(cwd, dir);
75
- if (external_node_fs_["default"].existsSync(fullPath) && external_node_fs_["default"].statSync(fullPath).isDirectory()) return dir;
73
+ const fullPath = node_path.join(cwd, dir);
74
+ if (node_fs.existsSync(fullPath) && node_fs.statSync(fullPath).isDirectory()) return dir;
76
75
  }
77
76
  return 'tests';
78
77
  }
@@ -93,7 +92,7 @@ function detectReact(pkg) {
93
92
  };
94
93
  }
95
94
  function detectTypeScript(cwd) {
96
- return external_node_fs_["default"].existsSync(external_node_path_["default"].join(cwd, 'tsconfig.json'));
95
+ return node_fs.existsSync(node_path.join(cwd, 'tsconfig.json'));
97
96
  }
98
97
  async function detectProject(cwd) {
99
98
  const pkg = readPackageJson(cwd);
@@ -311,7 +310,7 @@ function computeFilePreview(cwd, projectInfo) {
311
310
  componentExt = 'ts' === language ? '.ts' : '.js';
312
311
  testExt = 'ts' === language ? '.test.ts' : '.test.js';
313
312
  }
314
- const testDirPath = external_node_path_["default"].join(cwd, testDir);
313
+ const testDirPath = node_path.join(cwd, testDir);
315
314
  const baseName = getUniqueBaseName(testDirPath, 'Counter', componentExt);
316
315
  return {
317
316
  configFile,
@@ -373,7 +372,7 @@ async function createInteractive(cwd, projectInfo, isAgent) {
373
372
  }
374
373
  const provider = providerSelection;
375
374
  const preview = computeFilePreview(cwd, projectInfo);
376
- const deps = getDependenciesWithVersions(effectiveFramework, provider, "0.9.1");
375
+ const deps = getDependenciesWithVersions(effectiveFramework, provider, "0.9.2");
377
376
  const depsList = Object.entries(deps).map(([name, version])=>`${name}@${version}`).join(', ');
378
377
  const previewLines = [
379
378
  `${color.cyan('+')} Create ${preview.configFile}`,
@@ -417,10 +416,10 @@ async function generateFiles(cwd, projectInfo, provider) {
417
416
  const effectiveFramework = 'react' === framework ? 'react' : 'vanilla';
418
417
  const createdFiles = [];
419
418
  const configFileName = getConfigFileName();
420
- const configPath = external_node_path_["default"].join(cwd, configFileName);
419
+ const configPath = node_path.join(cwd, configFileName);
421
420
  writeFile(configPath, getConfigTemplate());
422
421
  createdFiles.push(configFileName);
423
- const testDirPath = external_node_path_["default"].join(cwd, testDir);
422
+ const testDirPath = node_path.join(cwd, testDir);
424
423
  ensureDir(testDirPath);
425
424
  let componentExt;
426
425
  let testExt;
@@ -433,11 +432,11 @@ async function generateFiles(cwd, projectInfo, provider) {
433
432
  }
434
433
  const baseName = getUniqueBaseName(testDirPath, 'Counter', componentExt);
435
434
  const componentFileName = `${baseName}${componentExt}`;
436
- const componentPath = external_node_path_["default"].join(testDirPath, componentFileName);
435
+ const componentPath = node_path.join(testDirPath, componentFileName);
437
436
  'react' === effectiveFramework ? writeFile(componentPath, getReactComponentTemplate(language)) : writeFile(componentPath, getVanillaComponentTemplate(language));
438
437
  createdFiles.push(`${testDir}/${componentFileName}`);
439
438
  const testFileName = `${baseName}${testExt}`;
440
- const testPath = external_node_path_["default"].join(testDirPath, testFileName);
439
+ const testPath = node_path.join(testDirPath, testFileName);
441
440
  let testContent;
442
441
  if ('react' === effectiveFramework) {
443
442
  testContent = getReactTestTemplate(language);
@@ -451,7 +450,7 @@ async function generateFiles(cwd, projectInfo, provider) {
451
450
  updatePackageJsonScripts(cwd, {
452
451
  'test:browser': 'rstest --config=rstest.browser.config.ts'
453
452
  });
454
- const deps = getDependenciesWithVersions(effectiveFramework, provider, "0.9.1");
453
+ const deps = getDependenciesWithVersions(effectiveFramework, provider, "0.9.2");
455
454
  updatePackageJsonDevDeps(cwd, deps);
456
455
  return createdFiles;
457
456
  }
@@ -1,7 +1,7 @@
1
1
  import "node:module";
2
2
  import { __webpack_require__ } from "./rslib-runtime.js";
3
- import "./1157.js";
4
- import { relative, color } from "./3160.js";
3
+ import "./4411.js";
4
+ import { relative, color } from "./6830.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);
7
7
  const THRESHOLD_KEYS = [
@@ -1,9 +1,8 @@
1
1
  import "node:module";
2
- import { __webpack_require__ } from "./rslib-runtime.js";
3
2
  import { AssertionError, strict } from "node:assert";
4
3
  import { Console } from "node:console";
5
- import { prettyTime, color } from "./3160.js";
6
- const external_node_util_ = __webpack_require__("node:util");
4
+ import { format, formatWithOptions, inspect } from "node:util";
5
+ import { prettyTime, color } from "./6830.js";
7
6
  const RealDate = Date;
8
7
  function createCustomConsole({ rpc, testPath, printConsoleTrace }) {
9
8
  const getConsoleTrace = ()=>{
@@ -50,40 +49,40 @@ function createCustomConsole({ rpc, testPath, printConsoleTrace }) {
50
49
  }
51
50
  count(label = 'default') {
52
51
  if (!this._counters[label]) this._counters[label] = 0;
53
- this._log('count', (0, external_node_util_.format)(`${label}: ${++this._counters[label]}`));
52
+ this._log('count', format(`${label}: ${++this._counters[label]}`));
54
53
  }
55
54
  countReset(label = 'default') {
56
55
  this._counters[label] = 0;
57
56
  }
58
57
  debug(firstArg, ...args) {
59
- this._log('debug', (0, external_node_util_.format)(firstArg, ...args));
58
+ this._log('debug', format(firstArg, ...args));
60
59
  }
61
60
  dir(firstArg, options = {}) {
62
- const representation = (0, external_node_util_.inspect)(firstArg, options);
63
- this._log('dir', (0, external_node_util_.formatWithOptions)(options, representation));
61
+ const representation = inspect(firstArg, options);
62
+ this._log('dir', formatWithOptions(options, representation));
64
63
  }
65
64
  dirxml(firstArg, ...args) {
66
- this._log('dirxml', (0, external_node_util_.format)(firstArg, ...args));
65
+ this._log('dirxml', format(firstArg, ...args));
67
66
  }
68
67
  error(firstArg, ...args) {
69
- this._log('error', (0, external_node_util_.format)(firstArg, ...args), 'stderr');
68
+ this._log('error', format(firstArg, ...args), 'stderr');
70
69
  }
71
70
  group(title, ...args) {
72
71
  this._groupDepth++;
73
- if (null != title || args.length > 0) this._log('group', color.bold((0, external_node_util_.format)(title, ...args)));
72
+ if (null != title || args.length > 0) this._log('group', color.bold(format(title, ...args)));
74
73
  }
75
74
  groupCollapsed(title, ...args) {
76
75
  this._groupDepth++;
77
- if (null != title || args.length > 0) this._log('groupCollapsed', color.bold((0, external_node_util_.format)(title, ...args)));
76
+ if (null != title || args.length > 0) this._log('groupCollapsed', color.bold(format(title, ...args)));
78
77
  }
79
78
  groupEnd() {
80
79
  if (this._groupDepth > 0) this._groupDepth--;
81
80
  }
82
81
  info(firstArg, ...args) {
83
- this._log('info', (0, external_node_util_.format)(firstArg, ...args));
82
+ this._log('info', format(firstArg, ...args));
84
83
  }
85
84
  log(firstArg, ...args) {
86
- this._log('log', (0, external_node_util_.format)(firstArg, ...args));
85
+ this._log('log', format(firstArg, ...args));
87
86
  }
88
87
  time(label = 'default') {
89
88
  if (null != this._timers[label]) return;
@@ -94,7 +93,7 @@ function createCustomConsole({ rpc, testPath, printConsoleTrace }) {
94
93
  if (null != startTime) {
95
94
  const endTime = RealDate.now();
96
95
  const time = endTime - startTime.getTime();
97
- this._log('time', (0, external_node_util_.format)(`${label}: ${prettyTime(time)}`));
96
+ this._log('time', format(`${label}: ${prettyTime(time)}`));
98
97
  delete this._timers[label];
99
98
  }
100
99
  }
@@ -103,11 +102,11 @@ function createCustomConsole({ rpc, testPath, printConsoleTrace }) {
103
102
  if (null != startTime) {
104
103
  const endTime = new RealDate();
105
104
  const time = endTime.getTime() - startTime.getTime();
106
- this._log('time', (0, external_node_util_.format)(`${label}: ${prettyTime(time)}`, ...data));
105
+ this._log('time', format(`${label}: ${prettyTime(time)}`, ...data));
107
106
  }
108
107
  }
109
108
  warn(firstArg, ...args) {
110
- this._log('warn', (0, external_node_util_.format)(firstArg, ...args), 'stderr');
109
+ this._log('warn', format(firstArg, ...args), 'stderr');
111
110
  }
112
111
  getBuffer() {}
113
112
  }