qunitx 0.6.1 → 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/README.md CHANGED
@@ -58,27 +58,25 @@ $ node --test some-test.js
58
58
 
59
59
  # Suggested mode: if you want to run it in CI/google chrome:
60
60
 
61
- $ qunitx some-test.js --browser
61
+ $ qunitx some-test.js
62
62
 
63
63
  # with browser output enabled:
64
64
 
65
- $ qunitx some-test.js --browser --debug
65
+ $ qunitx some-test.js --debug
66
66
 
67
67
  # TypeScript also works, make sure on node.js mode, tsconfig.json exists with compilerOptions.module & compilerOptions.moduleResolution set to "NodeNext":
68
68
 
69
69
  $ node --loader=ts-node/esm/transpile-only --test some-test.ts
70
70
 
71
- $ qunitx some-test.ts --browser --debug
71
+ $ qunitx some-test.ts --debug
72
72
 
73
73
  ```
74
74
 
75
75
  ### Code coverage
76
76
 
77
- QUnitX runner on node.js mode(without --browser) supports code coverage with c8, the best coverage tool
78
- in existence at the moment:
79
-
77
+ Since QUnitX proxies to default node.js test runner in when executed with node, you can use any code coverage tool you like. When running the tests in `qunit`(the browser mode) code coverage support is limited.
80
78
  ```
81
- c8 qunitx test/attachments test/user
79
+ c8 node test/attachments test/user
82
80
  ```
83
81
 
84
82
  You can browse [c8 documentation](https://github.com/bcoe/c8) for all configuration options.
package/cli.js CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env -S TS_NODE_COMPILER_OPTIONS='{"module":"ES2020"}' node --loader ts-node/esm/transpile-only
2
+ import process from 'node:process';
2
3
  import displayHelpOutput from './lib/commands/help.js';
3
4
  import initializeProject from './lib/commands/init.js';
4
5
  import generateTestFiles from './lib/commands/generate.js';
package/deno.lock CHANGED
@@ -1,6 +1,13 @@
1
1
  {
2
2
  "version": "2",
3
- "remote": {},
3
+ "remote": {
4
+ "https://deno.land/std@0.192.0/fmt/colors.ts": "d67e3cd9f472535241a8e410d33423980bec45047e343577554d3356e1f0ef4e",
5
+ "https://deno.land/std@0.192.0/testing/_diff.ts": "1a3c044aedf77647d6cac86b798c6417603361b66b54c53331b312caeb447aea",
6
+ "https://deno.land/std@0.192.0/testing/_format.ts": "a69126e8a469009adf4cf2a50af889aca364c349797e63174884a52ff75cf4c7",
7
+ "https://deno.land/std@0.192.0/testing/_test_suite.ts": "30f018feeb3835f12ab198d8a518f9089b1bcb2e8c838a8b615ab10d5005465c",
8
+ "https://deno.land/std@0.192.0/testing/asserts.ts": "e16d98b4d73ffc4ed498d717307a12500ae4f2cbe668f1a215632d19fcffc22f",
9
+ "https://deno.land/std@0.192.0/testing/bdd.ts": "59f7f7503066d66a12e50ace81bfffae5b735b6be1208f5684b630ae6b4de1d0"
10
+ },
4
11
  "npm": {
5
12
  "specifiers": {
6
13
  "auto-changelog@^2.4.0": "auto-changelog@2.4.0",
@@ -2,86 +2,51 @@ import fs from 'node:fs/promises';
2
2
  import { normalize, dirname } from 'node:path';
3
3
  import { fileURLToPath } from 'node:url';
4
4
  import kleur from 'kleur';
5
- import runTestsInNode from './run/tests-in-node.js';
6
5
  import runTestsInBrowser from './run/tests-in-browser.js';
7
6
  import setupBrowser from '../setup/browser.js';
8
7
  import fileWatcher from '../setup/file-watcher.js';
9
8
  import findInternalAssetsFromHTML from '../utils/find-internal-assets-from-html.js';
10
9
  import runUserModule from '../utils/run-user-module.js';
11
10
  import setupKeyboardEvents from '../setup/keyboard-events.js';
12
- import setupNodeJSEnvironment from '../setup/node-js-environment.js';
13
11
  import writeOutputStaticFiles from '../setup/write-output-static-files.js';
14
12
 
15
13
  const __dirname = dirname(fileURLToPath(import.meta.url));
16
14
 
17
15
  export default async function(config) {
18
- if (config.browser) {
19
- let cachedContent = await buildCachedContent(config, config.htmlPaths);
20
- let [connections, _] = await Promise.all([
21
- setupBrowser(config, cachedContent),
22
- writeOutputStaticFiles(config, cachedContent)
23
- ]);
24
- config.expressApp = connections.server;
25
-
26
- if (config.watch) {
27
- setupKeyboardEvents(config, cachedContent, connections);
28
- }
29
-
30
- if (config.before) {
31
- await runUserModule(`${process.cwd()}/${config.before}`, config, 'before');
32
- }
33
-
34
- await runTestsInBrowser(config, cachedContent, connections);
35
-
36
- if (config.watch) {
37
- logWatcherAndKeyboardShortcutInfo(config, connections.server);
38
-
39
- await fileWatcher(
40
- config.testFileLookupPaths,
41
- config,
42
- async (event, file) => {
43
- if (event === 'addDir') {
44
- return;
45
- } else if (['unlink', 'unlinkDir'].includes(event)) {
46
- return await runTestsInBrowser(config, cachedContent, connections);
47
- }
48
-
49
- await runTestsInBrowser(config, cachedContent, connections, [file]);
50
- },
51
- (path, event) => connections.server.publish('refresh', 'refresh')
52
- );
53
- }
54
- } else {
55
- global.testTimeout = config.timeout;
56
-
57
- await setupNodeJSEnvironment(config);
58
-
59
- if (config.watch) {
60
- setupKeyboardEvents(config);
61
- }
62
-
63
- if (config.before) {
64
- await runUserModule(`${process.cwd()}/${config.before}`, config, 'before');
65
- }
66
-
67
- await runTestsInNode(Object.keys(config.fsTree), config);
68
-
69
- if (config.watch) {
70
- logWatcherAndKeyboardShortcutInfo(config);
16
+ let cachedContent = await buildCachedContent(config, config.htmlPaths);
17
+ let [connections, _] = await Promise.all([
18
+ setupBrowser(config, cachedContent),
19
+ writeOutputStaticFiles(config, cachedContent)
20
+ ]);
21
+ config.expressApp = connections.server;
22
+
23
+ if (config.watch) {
24
+ setupKeyboardEvents(config, cachedContent, connections);
25
+ }
71
26
 
72
- await fileWatcher(
73
- config.testFileLookupPaths,
74
- config,
75
- async (event, file) => {
76
- if (['addDir', 'unlink', 'unlinkDir'].includes(event)) {
77
- return;
78
- }
27
+ if (config.before) {
28
+ await runUserModule(`${process.cwd()}/${config.before}`, config, 'before');
29
+ }
79
30
 
80
- await runTestsInNode([file], config)
81
- },
82
- () => {}
83
- );
84
- }
31
+ await runTestsInBrowser(config, cachedContent, connections);
32
+
33
+ if (config.watch) {
34
+ logWatcherAndKeyboardShortcutInfo(config, connections.server);
35
+
36
+ await fileWatcher(
37
+ config.testFileLookupPaths,
38
+ config,
39
+ async (event, file) => {
40
+ if (event === 'addDir') {
41
+ return;
42
+ } else if (['unlink', 'unlinkDir'].includes(event)) {
43
+ return await runTestsInBrowser(config, cachedContent, connections);
44
+ }
45
+
46
+ await runTestsInBrowser(config, cachedContent, connections, [file]);
47
+ },
48
+ (path, event) => connections.server.publish('refresh', 'refresh')
49
+ );
85
50
  }
86
51
  }
87
52
 
@@ -141,13 +106,8 @@ async function addCachedContentMainHTML(projectRoot, cachedContent) {
141
106
  }
142
107
 
143
108
  function logWatcherAndKeyboardShortcutInfo(config, server) {
144
- if (config.browser) {
145
- console.log('#', kleur.blue(`Watching files... You can browse the tests on http://localhost:${config.port} ...`)); // NOTE: maybe add also qx to exit
146
- console.log('#', kleur.blue(`Shortcuts: Press "qq" to abort running tests, "qa" to run all the tests, "qf" to run last failing test, "ql" to repeat last test`)); // NOTE: maybe add also qx to test specific
147
- } else {
148
- console.log('#', kleur.blue(`Watching files...`));
149
- console.log('#', kleur.blue(`Shortcuts: Press "qq" to abort running tests, "qa" to run all the tests, "qf" to run last failing test, "ql" to repeat last test`)); // NOTE: maybe add also qx to test specific
150
- }
109
+ console.log('#', kleur.blue(`Watching files... You can browse the tests on http://localhost:${config.port} ...`)); // NOTE: maybe add also qx to exit
110
+ console.log('#', kleur.blue(`Shortcuts: Press "qq" to abort running tests, "qa" to run all the tests, "qf" to run last failing test, "ql" to repeat last test`)); // NOTE: maybe add also qx to test specific
151
111
  }
152
112
 
153
113
  function normalizeInternalAssetPathFromHTML(projectRoot, assetPath, htmlPath) { // NOTE: maybe normalize ..
@@ -3,7 +3,7 @@ import picomatch from 'picomatch';
3
3
  import recursiveLookup from 'recursive-lookup';
4
4
 
5
5
  export default async function buildFSTree(fileAbsolutePaths, config = {}) {
6
- let targetExtensions = config.browser ? ['js', 'ts'] : ['js'];
6
+ let targetExtensions = ['js', 'ts'];
7
7
  let fsTree = {};
8
8
 
9
9
  await Promise.all(fileAbsolutePaths.map(async (fileAbsolutePath) => {
@@ -1,50 +1,27 @@
1
1
  import kleur from 'kleur';
2
2
  import listenToKeyboardKey from '../utils/listen-to-keyboard-key.js';
3
- import runTestsInNode from '../commands/run/tests-in-node.js';
4
3
  import runTestsInBrowser from '../commands/run/tests-in-browser.js';
5
4
 
6
5
  export default function setupKeyboardEvents(config, cachedContent, connections) {
7
- if (config.browser) {
8
- listenToKeyboardKey('qq', () => abortBrowserQUnit(config, connections));
9
- listenToKeyboardKey('qa', () => {
10
- abortBrowserQUnit(config, connections);
11
- runTestsInBrowser(config, cachedContent, connections)
12
- });
13
- listenToKeyboardKey('qf', () => {
14
- abortBrowserQUnit(config, connections);
6
+ listenToKeyboardKey('qq', () => abortBrowserQUnit(config, connections));
7
+ listenToKeyboardKey('qa', () => {
8
+ abortBrowserQUnit(config, connections);
9
+ runTestsInBrowser(config, cachedContent, connections)
10
+ });
11
+ listenToKeyboardKey('qf', () => {
12
+ abortBrowserQUnit(config, connections);
15
13
 
16
- if (!config.lastFailedTestFiles) {
17
- console.log('#', kleur.blue(`QUnitX: No tests failed so far, so repeating the last test run`));
18
- return runTestsInBrowser(config, cachedContent, connections, config.lastRanTestFiles);
19
- }
14
+ if (!config.lastFailedTestFiles) {
15
+ console.log('#', kleur.blue(`QUnitX: No tests failed so far, so repeating the last test run`));
16
+ return runTestsInBrowser(config, cachedContent, connections, config.lastRanTestFiles);
17
+ }
20
18
 
21
- runTestsInBrowser(config, cachedContent, connections, config.lastFailedTestFiles)
22
- });
23
- listenToKeyboardKey('ql', () => {
24
- abortBrowserQUnit(config, connections);
25
- runTestsInBrowser(config, cachedContent, connections, config.lastRanTestFiles)
26
- });
27
- } else {
28
- listenToKeyboardKey('qq', () => abortNodejsQUnit(config));
29
- listenToKeyboardKey('qa', () => {
30
- abortNodejsQUnit(config);
31
- runTestsInNode(Object.keys(config.fsTree), config)
32
- });
33
- listenToKeyboardKey('qf', () => {
34
- abortNodejsQUnit(config);
35
-
36
- if (!config.lastFailedTestFiles) {
37
- console.log('#', kleur.blue(`QUnitx: No tests failed so far, so repeating the last test run`));
38
- return runTestsInNode(config.lastRanTestFiles, config);
39
- }
40
-
41
- runTestsInNode(config.lastFailedTestFiles, config)
42
- });
43
- listenToKeyboardKey('ql', () => {
44
- abortNodejsQUnit(config);
45
- runTestsInNode(config.lastRanTestFiles, config)
46
- });
47
- }
19
+ runTestsInBrowser(config, cachedContent, connections, config.lastFailedTestFiles)
20
+ });
21
+ listenToKeyboardKey('ql', () => {
22
+ abortBrowserQUnit(config, connections);
23
+ runTestsInBrowser(config, cachedContent, connections, config.lastRanTestFiles)
24
+ });
48
25
  }
49
26
 
50
27
  function abortBrowserQUnit(config, connections) {
@@ -1,3 +1,4 @@
1
+ import process from 'node:process';
1
2
  import searchInParentDirectories from './search-in-parent-directories.js';
2
3
 
3
4
  export default async function() {
@@ -1,3 +1,5 @@
1
+ import process from 'node:process';
2
+
1
3
  let stdin = process.stdin;
2
4
  let targetInputs = {};
3
5
  let inputs = [];
@@ -1,9 +1,7 @@
1
- // { inputs: [], browser: true, debug: true, watch: true, failFast: true, htmlPaths: [], output }
1
+ // { inputs: [], debug: true, watch: true, failFast: true, htmlPaths: [], output }
2
2
  export default async function(projectRoot) {
3
3
  const providedFlags = process.argv.slice(2).reduce((result, arg) => {
4
- if (arg.startsWith('--browser')) {
5
- return Object.assign(result, { browser: parseBoolean(arg.split('=')[1]) });
6
- } else if (arg.startsWith('--debug')) {
4
+ if (arg.startsWith('--debug')) {
7
5
  return Object.assign(result, { debug: parseBoolean(arg.split('=')[1]) });
8
6
  } else if (arg.startsWith('--watch')) {
9
7
  return Object.assign(result, { watch: parseBoolean(arg.split('=')[1]) });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "qunitx",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.7.0",
5
5
  "description": "Experimental improvements, suggestions for qunit CLI",
6
6
  "author": "Izel Nakri",
7
7
  "license": "MIT",
@@ -45,8 +45,9 @@
45
45
  "release:alpha": "node_modules/.bin/release-it --preRelease=alpha --no-git.requireUpstream",
46
46
  "release:beta": "node_modules/.bin/release-it --preRelease=beta --no-git.requireUpstream",
47
47
  "release": "node_modules/.bin/release-it",
48
+ "test": "node --test test/index.js",
48
49
  "test:deno": "deno test --allow-read --allow-env --allow-run test/commands/index.js",
49
- "test": "node --test test/index.js | tee test-output.log",
50
+ "test:dev": "node --test test/index.js | tee test-output.log",
50
51
  "test:old": "node_modules/.bin/mocha --require test/setup.js --bail --exit --check-leaks test/inputs test/commands test/flags/after-test.js test/flags/before-test.js -t=20000",
51
52
  "test:sanity-first": "./cli.js test/helpers/failing-tests.js test/helpers/failing-tests.ts",
52
53
  "test:sanity-second": "./cli.js test/helpers/passing-tests.js test/helpers/passing-tests.ts"
@@ -1,8 +1,8 @@
1
1
  import { assert, assertEquals, assertNotEquals, assertStrictEquals, assertNotStrictEquals, assertObjectMatch, assertRejects, assertThrows } from "https://deno.land/std@0.192.0/testing/asserts.ts";
2
2
 
3
3
  class AssertionError extends Error {
4
- override name = 'AssertionError';
5
- constructor(message: string) {
4
+ // override name = 'AssertionError';
5
+ constructor(message) {
6
6
  super(message);
7
7
  }
8
8
  }
@@ -1,6 +1,7 @@
1
1
  import assert from 'node:assert';
2
2
 
3
3
  // TODO: write test cases for these
4
+ // TODO: basically keep going until const { message } = new assert.AssertionError({ actual, expected, operator, message });
4
5
  export default {
5
6
  _steps: [],
6
7
  async() {
package/shims/nodejs.js CHANGED
@@ -32,7 +32,7 @@ function assignDefaultValues(options, defaultValues) {
32
32
  return options;
33
33
  }
34
34
 
35
- export default { module, test, assert };
35
+ export default { module, test, assert, config: {} };
36
36
 
37
37
  // NOTE: later maybe expose these as well:
38
38
 
package/deno-bridge.js DELETED
@@ -1,16 +0,0 @@
1
- // This tool turns package.json imports into deno.json. Also binary make const mappings(without npm:) npm packages to asset-map.json?
2
- import fs from 'fs/promises';
3
-
4
- const packageJSON = JSON.parse(await fs.readFile('./package.json', 'utf8'));
5
-
6
- packageJSON.imports = packageJSON.imports || {};
7
-
8
- const assetMapContents = Object.keys(packageJSON.imports).reduce((result, dependencyName) => {
9
- Object.assign(result.imports, {
10
- [dependencyName]: packageJSON.imports[dependencyName]['deno'] || packageJSON.imports[dependencyName]['default'] || packageJSON.imports[dependencyName]['browser']
11
- });
12
-
13
- return result;
14
- }, { imports: {} });
15
-
16
- await fs.writeFile('./deno.json', JSON.stringify(assetMapContents, null, 2), 'utf8');
@@ -1,60 +0,0 @@
1
- import kleur from 'kleur';
2
-
3
- let count = 0;
4
-
5
- export default async function runTestsInNode(fileAbsolutePaths, config) {
6
- config.COUNTER = { testCount: 0, failCount: 0, skipCount: 0, passCount: 0 };
7
- global.testTimeout = config.timeout;
8
- // global.self = global;
9
-
10
- window.QUnit.reset();
11
-
12
- try {
13
- let waitForTestCompletion = setupTestWaiting();
14
-
15
- console.log('#', kleur.blue(`QUnitX running: ${fileAbsolutePaths.join(', ')}`));
16
- await Promise.all(fileAbsolutePaths.map(async (fileAbsolutePath) => {
17
- try {
18
- config.lastRanTestFiles = [fileAbsolutePath];
19
- count = count + 1;
20
-
21
- await import(`${fileAbsolutePath}?${count}`);
22
- } catch(error) {
23
- let exception = new ImportError(fileAbsolutePath, error);
24
-
25
- if (config.watch) {
26
- config.lastFailedTestFiles = [fileAbsolutePath];
27
- console.log(`# ${exception}`);
28
- } else {
29
- throw exception;
30
- }
31
- }
32
- }));
33
-
34
- console.log('TAP version 13');
35
-
36
- window.QUnit.start();
37
-
38
- await waitForTestCompletion;
39
- } catch (error) {
40
- console.log(error);
41
- }
42
- }
43
-
44
- function setupTestWaiting() {
45
- let finalizeTestCompletion;
46
- let promise = new Promise((resolve, reject) => finalizeTestCompletion = resolve);
47
-
48
- window.QUnit.done(() => finalizeTestCompletion());
49
-
50
- return promise;
51
- }
52
-
53
- class ImportError extends Error {
54
- constructor(path, message) {
55
- super(message);
56
- this.name = 'ImportError';
57
- this.targetFile = path;
58
- this.message = `File: ${path} | ${message}`.split('\n').join('\n# ');
59
- }
60
- }
@@ -1,74 +0,0 @@
1
- import jsdom from "jsdom";
2
- import QUnit from '../../index.js';
3
- import timeCounter from '../utils/time-counter.js';
4
- import runUserModule from '../utils/run-user-module.js';
5
- import TAPDisplayFinalResult from '../tap/display-final-result.js';
6
- import TAPDisplayTestResult from '../tap/display-test-result.js';
7
-
8
- function setupDOM() {
9
- const { JSDOM } = jsdom;
10
- const dom = new JSDOM("<p>Hello</p>", {
11
- url: "http://localhost",
12
- });
13
-
14
- global.window = dom.window;
15
- global.document = window.document;
16
- global.FormData = dom.window.FormData;
17
- // @ts-ignore
18
- global.self = global; // NOTE: super important for pretender
19
- self.XMLHttpRequest = dom.window.XMLHttpRequest; // pretender reference
20
- global.location = global.window.location; // removes href of undefined on jquery
21
- }
22
-
23
- export default async function setupNodeJSEnvironment(config) {
24
- setupDOM(); // NOTE: This is important for pretender & browser APIs
25
- // global.window = global;
26
-
27
- window.QUnit = QUnit;
28
- window.QUnit.config.autostart = false;
29
- window.QUnit.config.testTimeout = global.testTimeout;
30
-
31
- let TIME_COUNTER;
32
- window.QUnit.begin((details) => {
33
- TIME_COUNTER = timeCounter();
34
- });
35
- window.QUnit.on('testEnd', (details) => {
36
- if (config.aborted) {
37
- config.aborted = false;
38
- }
39
-
40
- TAPDisplayTestResult(config.COUNTER, details);
41
-
42
- if (details.status === 'failed') {
43
- config.lastFailedTestFiles = config.lastRanTestFiles;
44
-
45
-
46
- if (config.failFast) {
47
- abortQUnit();
48
- }
49
- }
50
- });
51
- window.QUnit.done(async (details) => {
52
- window.QUNIT_RESULT = Object.assign(details, {
53
- timeTaken: TIME_COUNTER.stop()
54
- });
55
- TAPDisplayFinalResult(config.COUNTER, details.timeTaken);
56
-
57
- if (config.after) {
58
- await runUserModule(`${process.cwd()}/${config.after}`, config.COUNTER, 'after');
59
- }
60
-
61
- if (!config.watch) {
62
- process.exit(config.COUNTER.failCount > 0 ? 1 : 0);
63
- }
64
- });
65
-
66
- process.on('unhandledRejection', (err) => console.error(err));
67
- process.on('uncaughtException', (err) => console.error(err));
68
-
69
- return window.QUnit;
70
- }
71
-
72
- function abortQUnit() {
73
- window.QUnit.config.queue.length = 0;
74
- }
package/test-output.log DELETED
@@ -1,781 +0,0 @@
1
- TAP version 13
2
- # Subtest: Commands | Help tests
3
- # Subtest: $ qunitx -> prints help text
4
- not ok 1 - $ qunitx -> prints help text
5
- ---
6
- duration_ms: 2098.219847
7
- failureType: 'testCodeFailure'
8
- error: |-
9
- Command failed: deno run --allow-read /home/izelnakri/Github/qunitx/cli.js
10
- Download https://registry.npmjs.org/auto-changelog
11
- Download https://registry.npmjs.org/cheerio
12
- Download https://registry.npmjs.org/chokidar
13
- Download https://registry.npmjs.org/cors
14
- Download https://registry.npmjs.org/esbuild
15
- Download https://registry.npmjs.org/express
16
- Download https://registry.npmjs.org/js-yaml
17
- Download https://registry.npmjs.org/jsdom
18
- Download https://registry.npmjs.org/kleur
19
- Download https://registry.npmjs.org/picomatch
20
- Download https://registry.npmjs.org/prettier
21
- Download https://registry.npmjs.org/puppeteer
22
- Download https://registry.npmjs.org/qunit
23
- Download https://registry.npmjs.org/qunitx
24
- Download https://registry.npmjs.org/recursive-lookup
25
- Download https://registry.npmjs.org/release-it
26
- Download https://registry.npmjs.org/ts-node
27
- Download https://registry.npmjs.org/ws
28
- error: Could not find npm package 'release-it' matching '^16.1.3'.
29
-
30
- code: 1
31
- stack: |-
32
- ChildProcess.exithandler (node:child_process:419:12)
33
- ChildProcess.emit (node:events:511:28)
34
- maybeClose (node:internal/child_process:1098:16)
35
- ChildProcess._handle.onexit (node:internal/child_process:304:5)
36
- ...
37
- # Subtest: $ qunitx print -> prints help text
38
- not ok 2 - $ qunitx print -> prints help text
39
- ---
40
- duration_ms: 1799.229744
41
- failureType: 'testCodeFailure'
42
- error: |-
43
- Command failed: deno run --allow-read /home/izelnakri/Github/qunitx/cli.js print
44
- Download https://registry.npmjs.org/auto-changelog
45
- Download https://registry.npmjs.org/cheerio
46
- Download https://registry.npmjs.org/chokidar
47
- Download https://registry.npmjs.org/cors
48
- Download https://registry.npmjs.org/esbuild
49
- Download https://registry.npmjs.org/express
50
- Download https://registry.npmjs.org/js-yaml
51
- Download https://registry.npmjs.org/jsdom
52
- Download https://registry.npmjs.org/kleur
53
- Download https://registry.npmjs.org/picomatch
54
- Download https://registry.npmjs.org/prettier
55
- Download https://registry.npmjs.org/puppeteer
56
- Download https://registry.npmjs.org/qunit
57
- Download https://registry.npmjs.org/qunitx
58
- Download https://registry.npmjs.org/recursive-lookup
59
- Download https://registry.npmjs.org/release-it
60
- Download https://registry.npmjs.org/ts-node
61
- Download https://registry.npmjs.org/ws
62
- error: Could not find npm package 'release-it' matching '^16.1.3'.
63
-
64
- code: 1
65
- stack: |-
66
- ChildProcess.exithandler (node:child_process:419:12)
67
- ChildProcess.emit (node:events:511:28)
68
- maybeClose (node:internal/child_process:1098:16)
69
- ChildProcess._handle.onexit (node:internal/child_process:304:5)
70
- ...
71
- # Subtest: $ qunitx p -> prints help text
72
- not ok 3 - $ qunitx p -> prints help text
73
- ---
74
- duration_ms: 2056.471292
75
- failureType: 'testCodeFailure'
76
- error: |-
77
- Command failed: deno run --allow-read /home/izelnakri/Github/qunitx/cli.js p
78
- Download https://registry.npmjs.org/auto-changelog
79
- Download https://registry.npmjs.org/cheerio
80
- Download https://registry.npmjs.org/chokidar
81
- Download https://registry.npmjs.org/cors
82
- Download https://registry.npmjs.org/esbuild
83
- Download https://registry.npmjs.org/express
84
- Download https://registry.npmjs.org/js-yaml
85
- Download https://registry.npmjs.org/jsdom
86
- Download https://registry.npmjs.org/kleur
87
- Download https://registry.npmjs.org/picomatch
88
- Download https://registry.npmjs.org/prettier
89
- Download https://registry.npmjs.org/puppeteer
90
- Download https://registry.npmjs.org/qunit
91
- Download https://registry.npmjs.org/qunitx
92
- Download https://registry.npmjs.org/recursive-lookup
93
- Download https://registry.npmjs.org/release-it
94
- Download https://registry.npmjs.org/ts-node
95
- Download https://registry.npmjs.org/ws
96
- error: Could not find npm package 'release-it' matching '^16.1.3'.
97
-
98
- code: 1
99
- stack: |-
100
- ChildProcess.exithandler (node:child_process:419:12)
101
- ChildProcess.emit (node:events:511:28)
102
- maybeClose (node:internal/child_process:1098:16)
103
- ChildProcess._handle.onexit (node:internal/child_process:304:5)
104
- ...
105
- # Subtest: $ qunitx help -> prints help text
106
- not ok 4 - $ qunitx help -> prints help text
107
- ---
108
- duration_ms: 5314.819146
109
- failureType: 'testCodeFailure'
110
- error: |-
111
- Command failed: deno run --allow-read /home/izelnakri/Github/qunitx/cli.js help
112
- Download https://registry.npmjs.org/auto-changelog
113
- Download https://registry.npmjs.org/cheerio
114
- Download https://registry.npmjs.org/chokidar
115
- Download https://registry.npmjs.org/cors
116
- Download https://registry.npmjs.org/esbuild
117
- Download https://registry.npmjs.org/express
118
- Download https://registry.npmjs.org/js-yaml
119
- Download https://registry.npmjs.org/jsdom
120
- Download https://registry.npmjs.org/kleur
121
- Download https://registry.npmjs.org/picomatch
122
- Download https://registry.npmjs.org/prettier
123
- Download https://registry.npmjs.org/puppeteer
124
- Download https://registry.npmjs.org/qunit
125
- Download https://registry.npmjs.org/qunitx
126
- Download https://registry.npmjs.org/recursive-lookup
127
- Download https://registry.npmjs.org/release-it
128
- Download https://registry.npmjs.org/ts-node
129
- Download https://registry.npmjs.org/ws
130
- error: Could not find npm package 'release-it' matching '^16.1.3'.
131
-
132
- code: 1
133
- stack: |-
134
- ChildProcess.exithandler (node:child_process:419:12)
135
- ChildProcess.emit (node:events:511:28)
136
- maybeClose (node:internal/child_process:1098:16)
137
- ChildProcess._handle.onexit (node:internal/child_process:304:5)
138
- ...
139
- # Subtest: $ qunitx h -> prints help text
140
- not ok 5 - $ qunitx h -> prints help text
141
- ---
142
- duration_ms: 5291.016724
143
- failureType: 'testCodeFailure'
144
- error: |-
145
- Command failed: deno run --allow-read /home/izelnakri/Github/qunitx/cli.js h
146
- Download https://registry.npmjs.org/auto-changelog
147
- Download https://registry.npmjs.org/cheerio
148
- Download https://registry.npmjs.org/chokidar
149
- Download https://registry.npmjs.org/cors
150
- Download https://registry.npmjs.org/esbuild
151
- Download https://registry.npmjs.org/express
152
- Download https://registry.npmjs.org/js-yaml
153
- Download https://registry.npmjs.org/jsdom
154
- Download https://registry.npmjs.org/kleur
155
- Download https://registry.npmjs.org/picomatch
156
- Download https://registry.npmjs.org/prettier
157
- Download https://registry.npmjs.org/puppeteer
158
- Download https://registry.npmjs.org/qunit
159
- Download https://registry.npmjs.org/qunitx
160
- Download https://registry.npmjs.org/recursive-lookup
161
- Download https://registry.npmjs.org/release-it
162
- Download https://registry.npmjs.org/ts-node
163
- Download https://registry.npmjs.org/ws
164
- error: Could not find npm package 'release-it' matching '^16.1.3'.
165
-
166
- code: 1
167
- stack: |-
168
- ChildProcess.exithandler (node:child_process:419:12)
169
- ChildProcess.emit (node:events:511:28)
170
- maybeClose (node:internal/child_process:1098:16)
171
- ChildProcess._handle.onexit (node:internal/child_process:304:5)
172
- ...
173
- 1..5
174
- not ok 1 - Commands | Help tests
175
- ---
176
- duration_ms: 5322.847296
177
- type: 'suite'
178
- failureType: 'subtestsFailed'
179
- error: '5 subtests failed'
180
- code: 'ERR_TEST_FAILURE'
181
- ...
182
- # Trace:
183
- # TEST NAME: --after script tests | --after works when it doesnt need to be awaited
184
- # TEST COMMAND: node cli.js test/helpers/passing-tests.js --after=test/helpers/after-script-basic.js
185
- # 0: \# QUnitX running: /home/izelnakri/Github/qunitx/test/helpers/passing-tests.js
186
- # 1: TAP version 13
187
- # 2: calling assert true test case
188
- # 3: ok 1 {{moduleName}} Passing Tests | assert true works \# (1 ms)
189
- # 4: resolving async test
190
- # 5: {
191
- # 6: moduleName: 'called resolved async test with object',
192
- # 7: placeholder: 1000,
193
- # 8: anotherObject: { firstName: 'Izel', createdAt: 2021-03-06T00:00:00.000Z }
194
- # 9: }
195
- # 10: ok 2 {{moduleName}} Passing Tests | async test finishes \# (55 ms)
196
- # 11: calling deepEqual test case
197
- # 12: ok 3 {{moduleName}} Passing Tests | deepEqual true works \# (0 ms)
198
- # 13:
199
- # 14: 1..3
200
- # 15: \# tests 3
201
- # 16: \# pass 3
202
- # 17: \# skip 0
203
- # 18: \# fail 0
204
- # 19: \# duration 59
205
- # 20:
206
- # 21: This is running from after script!!
207
- # 22:
208
- #
209
- # at execute (file:///home/izelnakri/Github/qunitx/test/helpers/shell.js:11:13)
210
- # at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
211
- # at async file:///home/izelnakri/Github/qunitx/test/flags/after-test.js:7:24
212
- # at async TestContext.<anonymous> (file:///home/izelnakri/Github/qunitx/shims/nodejs.js:21:12)
213
- # at async Test.run (node:internal/test_runner/test:570:9)
214
- # at async Promise.all (index 0)
215
- # at async Suite.run (node:internal/test_runner/test:806:7)
216
- # at async Test.processPendingSubtests (node:internal/test_runner/test:316:7)
217
- # Subtest: --after script tests
218
- # Subtest: --after works when it doesnt need to be awaited
219
- ok 1 - --after works when it doesnt need to be awaited
220
- ---
221
- duration_ms: 1701.447585
222
- ...
223
- # Trace:
224
- # TEST NAME: --after script tests | --after works it needs to be awaited
225
- # TEST COMMAND: node cli.js test/helpers/passing-tests.js --after=test/helpers/after-script-async.js
226
- # 0: \# QUnitX running: /home/izelnakri/Github/qunitx/test/helpers/passing-tests.js
227
- # 1: TAP version 13
228
- # 2: calling assert true test case
229
- # 3: ok 1 {{moduleName}} Passing Tests | assert true works \# (1 ms)
230
- # 4: resolving async test
231
- # 5: {
232
- # 6: moduleName: 'called resolved async test with object',
233
- # 7: placeholder: 1000,
234
- # 8: anotherObject: { firstName: 'Izel', createdAt: 2021-03-06T00:00:00.000Z }
235
- # 9: }
236
- # 10: ok 2 {{moduleName}} Passing Tests | async test finishes \# (55 ms)
237
- # 11: calling deepEqual test case
238
- # 12: ok 3 {{moduleName}} Passing Tests | deepEqual true works \# (1 ms)
239
- # 13:
240
- # 14: 1..3
241
- # 15: \# tests 3
242
- # 16: \# pass 3
243
- # 17: \# skip 0
244
- # 18: \# fail 0
245
- # 19: \# duration 61
246
- # 20:
247
- # 21: This is running from after script!!
248
- # 22: After script result is written:
249
- # 23: {
250
- # 24: "testCount": 3,
251
- # 25: "failCount": 0,
252
- # 26: "skipCount": 0,
253
- # 27: "passCount": 3
254
- # 28: }
255
- # 29:
256
- #
257
- # at execute (file:///home/izelnakri/Github/qunitx/test/helpers/shell.js:11:13)
258
- # at async file:///home/izelnakri/Github/qunitx/test/flags/after-test.js:23:24
259
- # at async TestContext.<anonymous> (file:///home/izelnakri/Github/qunitx/shims/nodejs.js:21:12)
260
- # at async Test.run (node:internal/test_runner/test:570:9)
261
- # at async Promise.all (index 2)
262
- # at async Suite.run (node:internal/test_runner/test:806:7)
263
- # at async Test.processPendingSubtests (node:internal/test_runner/test:316:7)
264
- # Trace:
265
- # ERROR TEST Name: --after script tests | --after works for --browser mode when it doesnt need to be awaited
266
- # ERROR TEST COMMAND: node cli.js test/helpers/passing-tests.js --browser --after=test/helpers/after-script-basic.js
267
- # Error: Command failed: node cli.js test/helpers/passing-tests.js --browser --after=test/helpers/after-script-basic.js
268
- # BROWSER: runtime error thrown during executing tests
269
- #
270
- # at execute (file:///home/izelnakri/Github/qunitx/test/helpers/shell.js:27:13)
271
- # at async file:///home/izelnakri/Github/qunitx/test/flags/after-test.js:15:24
272
- # at async TestContext.<anonymous> (file:///home/izelnakri/Github/qunitx/shims/nodejs.js:21:12)
273
- # at async Test.run (node:internal/test_runner/test:570:9)
274
- # at async Promise.all (index 1)
275
- # at async Suite.run (node:internal/test_runner/test:806:7)
276
- # at async Test.processPendingSubtests (node:internal/test_runner/test:316:7)
277
- # Subtest: --after works for --browser mode when it doesnt need to be awaited
278
- not ok 2 - --after works for --browser mode when it doesnt need to be awaited
279
- ---
280
- duration_ms: 2811.673683
281
- failureType: 'testCodeFailure'
282
- error: |-
283
- Command failed: node cli.js test/helpers/passing-tests.js --browser --after=test/helpers/after-script-basic.js
284
- BROWSER: runtime error thrown during executing tests
285
-
286
- code: 1
287
- stack: |-
288
- ChildProcess.exithandler (node:child_process:419:12)
289
- ChildProcess.emit (node:events:511:28)
290
- maybeClose (node:internal/child_process:1098:16)
291
- Socket.<anonymous> (node:internal/child_process:456:11)
292
- Socket.emit (node:events:511:28)
293
- Pipe.<anonymous> (node:net:334:12)
294
- ...
295
- # Subtest: --after works it needs to be awaited
296
- ok 3 - --after works it needs to be awaited
297
- ---
298
- duration_ms: 1723.9877
299
- ...
300
- # Trace:
301
- # ERROR TEST Name: --after script tests | --after works for --browser mode it needs to be awaited
302
- # ERROR TEST COMMAND: node cli.js test/helpers/passing-tests.js --browser --after=test/helpers/after-script-async.js
303
- # Error: Command failed: node cli.js test/helpers/passing-tests.js --browser --after=test/helpers/after-script-async.js
304
- # BROWSER: runtime error thrown during executing tests
305
- #
306
- # at execute (file:///home/izelnakri/Github/qunitx/test/helpers/shell.js:27:13)
307
- # at async file:///home/izelnakri/Github/qunitx/test/flags/after-test.js:33:24
308
- # at async TestContext.<anonymous> (file:///home/izelnakri/Github/qunitx/shims/nodejs.js:21:12)
309
- # at async Test.run (node:internal/test_runner/test:570:9)
310
- # at async Promise.all (index 3)
311
- # at async Suite.run (node:internal/test_runner/test:806:7)
312
- # at async Test.processPendingSubtests (node:internal/test_runner/test:316:7)
313
- # Subtest: --after works for --browser mode it needs to be awaited
314
- not ok 4 - --after works for --browser mode it needs to be awaited
315
- ---
316
- duration_ms: 2811.590547
317
- failureType: 'testCodeFailure'
318
- error: |-
319
- Command failed: node cli.js test/helpers/passing-tests.js --browser --after=test/helpers/after-script-async.js
320
- BROWSER: runtime error thrown during executing tests
321
-
322
- code: 1
323
- stack: |-
324
- ChildProcess.exithandler (node:child_process:419:12)
325
- ChildProcess.emit (node:events:511:28)
326
- maybeClose (node:internal/child_process:1098:16)
327
- Socket.<anonymous> (node:internal/child_process:456:11)
328
- Socket.emit (node:events:511:28)
329
- Pipe.<anonymous> (node:net:334:12)
330
- ...
331
- 1..4
332
- not ok 2 - --after script tests
333
- ---
334
- duration_ms: 2833.285669
335
- type: 'suite'
336
- failureType: 'subtestsFailed'
337
- error: '2 subtests failed'
338
- code: 'ERR_TEST_FAILURE'
339
- ...
340
- # Trace:
341
- # TEST NAME: --before script tests | --before works when it doesnt need to be awaited
342
- # TEST COMMAND: node cli.js test/helpers/passing-tests.js --before=test/helpers/before-script-basic.js
343
- # 0: This is running from before script!!
344
- # 1: \# QUnitX running: /home/izelnakri/Github/qunitx/test/helpers/passing-tests.js
345
- # 2: TAP version 13
346
- # 3: calling assert true test case
347
- # 4: ok 1 {{moduleName}} Passing Tests | assert true works \# (1 ms)
348
- # 5: resolving async test
349
- # 6: {
350
- # 7: moduleName: 'called resolved async test with object',
351
- # 8: placeholder: 1000,
352
- # 9: anotherObject: { firstName: 'Izel', createdAt: 2021-03-06T00:00:00.000Z }
353
- # 10: }
354
- # 11: ok 2 {{moduleName}} Passing Tests | async test finishes \# (56 ms)
355
- # 12: calling deepEqual test case
356
- # 13: ok 3 {{moduleName}} Passing Tests | deepEqual true works \# (1 ms)
357
- # 14:
358
- # 15: 1..3
359
- # 16: \# tests 3
360
- # 17: \# pass 3
361
- # 18: \# skip 0
362
- # 19: \# fail 0
363
- # 20: \# duration 61
364
- # 21:
365
- # 22:
366
- #
367
- # at execute (file:///home/izelnakri/Github/qunitx/test/helpers/shell.js:11:13)
368
- # at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
369
- # at async file:///home/izelnakri/Github/qunitx/test/flags/before-test.js:7:24
370
- # at async TestContext.<anonymous> (file:///home/izelnakri/Github/qunitx/shims/nodejs.js:21:12)
371
- # at async Test.run (node:internal/test_runner/test:570:9)
372
- # at async Promise.all (index 0)
373
- # at async Suite.run (node:internal/test_runner/test:806:7)
374
- # at async Test.processPendingSubtests (node:internal/test_runner/test:316:7)
375
- # Subtest: --before script tests
376
- # Subtest: --before works when it doesnt need to be awaited
377
- ok 1 - --before works when it doesnt need to be awaited
378
- ---
379
- duration_ms: 1016.949143
380
- ...
381
- # Trace:
382
- # TEST NAME: --before script tests | --before works it needs to be awaited
383
- # TEST COMMAND: node cli.js test/helpers/passing-tests.js test/helpers/before-script-web-server-tests.js --before=test/helpers/before-script-async.js
384
- # 0: This is running from before script!!
385
- # 1: Starting before script with:
386
- # 2: DOESNT HAVE SERVER RUNNING
387
- # 3: Web server started on port 1234
388
- # 4: \# QUnitX running: /home/izelnakri/Github/qunitx/test/helpers/passing-tests.js, /home/izelnakri/Github/qunitx/test/helpers/before-script-web-server-tests.js
389
- # 5: TAP version 13
390
- # 6: calling assert true test case
391
- # 7: ok 1 {{moduleName}} Passing Tests | assert true works \# (1 ms)
392
- # 8: resolving async test
393
- # 9: {
394
- # 10: moduleName: 'called resolved async test with object',
395
- # 11: placeholder: 1000,
396
- # 12: anotherObject: { firstName: 'Izel', createdAt: 2021-03-06T00:00:00.000Z }
397
- # 13: }
398
- # 14: ok 2 {{moduleName}} Passing Tests | async test finishes \# (54 ms)
399
- # 15: calling deepEqual test case
400
- # 16: ok 3 {{moduleName}} Passing Tests | deepEqual true works \# (1 ms)
401
- # 17: ok 4 {{moduleName}} Before script web server tests | assert true works \# (338 ms)
402
- # 18:
403
- # 19: 1..4
404
- # 20: \# tests 4
405
- # 21: \# pass 4
406
- # 22: \# skip 0
407
- # 23: \# fail 0
408
- # 24: \# duration 397
409
- # 25:
410
- # 26:
411
- #
412
- # at execute (file:///home/izelnakri/Github/qunitx/test/helpers/shell.js:11:13)
413
- # at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
414
- # at async file:///home/izelnakri/Github/qunitx/test/flags/before-test.js:23:24
415
- # at async TestContext.<anonymous> (file:///home/izelnakri/Github/qunitx/shims/nodejs.js:21:12)
416
- # at async Test.run (node:internal/test_runner/test:570:9)
417
- # at async Promise.all (index 2)
418
- # at async Suite.run (node:internal/test_runner/test:806:7)
419
- # at async Test.processPendingSubtests (node:internal/test_runner/test:316:7)
420
- # Trace:
421
- # ERROR TEST Name: --before script tests | --before works for --browser mode when it doesnt need to be awaited
422
- # ERROR TEST COMMAND: node cli.js test/helpers/passing-tests.js --browser --before=test/helpers/before-script-basic.js
423
- # Error: Command failed: node cli.js test/helpers/passing-tests.js --browser --before=test/helpers/before-script-basic.js
424
- # file:///home/izelnakri/Github/qunitx/lib/commands/run/tests-in-browser.js:94
425
- # let exception = new BundleError(error);
426
- # ^
427
- # BundleError: esbuild Bundle Error: TypeError: connections.server.close is not a function
428
- # at runTestsInBrowser (file:///home/izelnakri/Github/qunitx/lib/commands/run/tests-in-browser.js:94:21)
429
- # at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
430
- # at async default (file:///home/izelnakri/Github/qunitx/lib/commands/run.js:34:5)
431
- # at async file:///home/izelnakri/Github/qunitx/cli.js:23:10
432
- # Node.js v20.3.1
433
- #
434
- # at execute (file:///home/izelnakri/Github/qunitx/test/helpers/shell.js:27:13)
435
- # at async file:///home/izelnakri/Github/qunitx/test/flags/before-test.js:15:24
436
- # at async TestContext.<anonymous> (file:///home/izelnakri/Github/qunitx/shims/nodejs.js:21:12)
437
- # at async Test.run (node:internal/test_runner/test:570:9)
438
- # at async Promise.all (index 1)
439
- # at async Suite.run (node:internal/test_runner/test:806:7)
440
- # at async Test.processPendingSubtests (node:internal/test_runner/test:316:7)
441
- # Subtest: --before works for --browser mode when it doesnt need to be awaited
442
- not ok 2 - --before works for --browser mode when it doesnt need to be awaited
443
- ---
444
- duration_ms: 2164.442538
445
- failureType: 'testCodeFailure'
446
- error: |-
447
- Command failed: node cli.js test/helpers/passing-tests.js --browser --before=test/helpers/before-script-basic.js
448
- file:///home/izelnakri/Github/qunitx/lib/commands/run/tests-in-browser.js:94
449
- let exception = new BundleError(error);
450
- ^
451
-
452
- BundleError: esbuild Bundle Error: TypeError: connections.server.close is not a function
453
- at runTestsInBrowser (file:///home/izelnakri/Github/qunitx/lib/commands/run/tests-in-browser.js:94:21)
454
- at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
455
- at async default (file:///home/izelnakri/Github/qunitx/lib/commands/run.js:34:5)
456
- at async file:///home/izelnakri/Github/qunitx/cli.js:23:10
457
-
458
- Node.js v20.3.1
459
-
460
- code: 1
461
- stack: |-
462
- runTestsInBrowser (file:///home/izelnakri/Github/qunitx/lib/commands/run/tests-in-browser.js:94:21)
463
- process.processTicksAndRejections (node:internal/process/task_queues:95:5)
464
- async default (file:///home/izelnakri/Github/qunitx/lib/commands/run.js:34:5)
465
- async file:///home/izelnakri/Github/qunitx/cli.js:23:10
466
- ChildProcess.exithandler (node:child_process:419:12)
467
- ChildProcess.emit (node:events:511:28)
468
- maybeClose (node:internal/child_process:1098:16)
469
- Socket.<anonymous> (node:internal/child_process:456:11)
470
- Socket.emit (node:events:511:28)
471
- Pipe.<anonymous> (node:net:334:12)
472
- ...
473
- # Subtest: --before works it needs to be awaited
474
- ok 3 - --before works it needs to be awaited
475
- ---
476
- duration_ms: 1636.157778
477
- ...
478
- # Trace:
479
- # ERROR TEST Name: --before script tests | --before works for --browser mode it needs to be awaited
480
- # ERROR TEST COMMAND: node cli.js test/helpers/passing-tests.js test/helpers/before-script-web-server-tests.js --browser --before=test/helpers/before-script-async.js
481
- # Error: Command failed: node cli.js test/helpers/passing-tests.js test/helpers/before-script-web-server-tests.js --browser --before=test/helpers/before-script-async.js
482
- # file:///home/izelnakri/Github/qunitx/lib/commands/run/tests-in-browser.js:94
483
- # let exception = new BundleError(error);
484
- # ^
485
- # BundleError: esbuild Bundle Error: TypeError: connections.server.close is not a function
486
- # at runTestsInBrowser (file:///home/izelnakri/Github/qunitx/lib/commands/run/tests-in-browser.js:94:21)
487
- # at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
488
- # at async default (file:///home/izelnakri/Github/qunitx/lib/commands/run.js:34:5)
489
- # at async file:///home/izelnakri/Github/qunitx/cli.js:23:10
490
- # Node.js v20.3.1
491
- #
492
- # at execute (file:///home/izelnakri/Github/qunitx/test/helpers/shell.js:27:13)
493
- # at async file:///home/izelnakri/Github/qunitx/test/flags/before-test.js:33:24
494
- # at async TestContext.<anonymous> (file:///home/izelnakri/Github/qunitx/shims/nodejs.js:21:12)
495
- # at async Test.run (node:internal/test_runner/test:570:9)
496
- # at async Promise.all (index 3)
497
- # at async Suite.run (node:internal/test_runner/test:806:7)
498
- # at async Test.processPendingSubtests (node:internal/test_runner/test:316:7)
499
- # Subtest: --before works for --browser mode it needs to be awaited
500
- not ok 4 - --before works for --browser mode it needs to be awaited
501
- ---
502
- duration_ms: 2184.29529
503
- failureType: 'testCodeFailure'
504
- error: |-
505
- Command failed: node cli.js test/helpers/passing-tests.js test/helpers/before-script-web-server-tests.js --browser --before=test/helpers/before-script-async.js
506
- file:///home/izelnakri/Github/qunitx/lib/commands/run/tests-in-browser.js:94
507
- let exception = new BundleError(error);
508
- ^
509
-
510
- BundleError: esbuild Bundle Error: TypeError: connections.server.close is not a function
511
- at runTestsInBrowser (file:///home/izelnakri/Github/qunitx/lib/commands/run/tests-in-browser.js:94:21)
512
- at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
513
- at async default (file:///home/izelnakri/Github/qunitx/lib/commands/run.js:34:5)
514
- at async file:///home/izelnakri/Github/qunitx/cli.js:23:10
515
-
516
- Node.js v20.3.1
517
-
518
- code: 1
519
- stack: |-
520
- runTestsInBrowser (file:///home/izelnakri/Github/qunitx/lib/commands/run/tests-in-browser.js:94:21)
521
- process.processTicksAndRejections (node:internal/process/task_queues:95:5)
522
- async default (file:///home/izelnakri/Github/qunitx/lib/commands/run.js:34:5)
523
- async file:///home/izelnakri/Github/qunitx/cli.js:23:10
524
- ChildProcess.exithandler (node:child_process:419:12)
525
- ChildProcess.emit (node:events:511:28)
526
- maybeClose (node:internal/child_process:1098:16)
527
- Socket.<anonymous> (node:internal/child_process:456:11)
528
- Socket.emit (node:events:511:28)
529
- Pipe.<anonymous> (node:net:334:12)
530
- ...
531
- 1..4
532
- not ok 3 - --before script tests
533
- ---
534
- duration_ms: 2211.418543
535
- type: 'suite'
536
- failureType: 'subtestsFailed'
537
- error: '2 subtests failed'
538
- code: 'ERR_TEST_FAILURE'
539
- ...
540
- # Subtest: Advanced HTML Input Tests
541
- # Subtest: testing with specific html without content works
542
- ok 1 - testing with specific html without content works
543
- ---
544
- duration_ms: 0.646948
545
- ...
546
- 1..1
547
- ok 4 - Advanced HTML Input Tests
548
- ---
549
- duration_ms: 1.061714
550
- type: 'suite'
551
- ...
552
- # Subtest: Advanced Error Edge Cases Tests
553
- # Subtest: todo
554
- ok 1 - todo
555
- ---
556
- duration_ms: 0.466879
557
- ...
558
- 1..1
559
- ok 5 - Advanced Error Edge Cases Tests
560
- ---
561
- duration_ms: 0.810824
562
- type: 'suite'
563
- ...
564
- # Subtest: File and Folder Combination Tests
565
- # Subtest: todo
566
- ok 1 - todo
567
- ---
568
- duration_ms: 0.905731
569
- ...
570
- 1..1
571
- ok 6 - File and Folder Combination Tests
572
- ---
573
- duration_ms: 1.155284
574
- type: 'suite'
575
- ...
576
- # Trace:
577
- # TEST NAME: File Input Tests | testing a single passing js file works
578
- # TEST COMMAND: node cli.js tmp/test/passing-tests.js
579
- # 0: \# QUnitX running: /home/izelnakri/Github/qunitx/tmp/test/passing-tests.js
580
- # 1: TAP version 13
581
- # 2: calling assert true test case
582
- # 3: ok 1 {{moduleName}} Passing Tests | assert true works \# (1 ms)
583
- # 4: resolving async test
584
- # 5: {
585
- # 6: moduleName: 'called resolved async test with object',
586
- # 7: placeholder: 1000,
587
- # 8: anotherObject: { firstName: 'Izel', createdAt: 2021-03-06T00:00:00.000Z }
588
- # 9: }
589
- # 10: ok 2 {{moduleName}} Passing Tests | async test finishes \# (53 ms)
590
- # 11: calling deepEqual test case
591
- # 12: ok 3 {{moduleName}} Passing Tests | deepEqual true works \# (0 ms)
592
- # 13:
593
- # 14: 1..3
594
- # 15: \# tests 3
595
- # 16: \# pass 3
596
- # 17: \# skip 0
597
- # 18: \# fail 0
598
- # 19: \# duration 57
599
- # 20:
600
- # 21:
601
- #
602
- # at execute (file:///home/izelnakri/Github/qunitx/test/helpers/shell.js:11:13)
603
- # at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
604
- # at async file:///home/izelnakri/Github/qunitx/test/inputs/file-test.js:7:24
605
- # at async TestContext.<anonymous> (file:///home/izelnakri/Github/qunitx/shims/nodejs.js:21:12)
606
- # at async Test.run (node:internal/test_runner/test:570:9)
607
- # at async Promise.all (index 0)
608
- # at async Suite.run (node:internal/test_runner/test:806:7)
609
- # at async Test.processPendingSubtests (node:internal/test_runner/test:316:7)
610
- # Subtest: File Input Tests
611
- # Subtest: testing a single passing js file works
612
- ok 1 - testing a single passing js file works
613
- ---
614
- duration_ms: 665.877902
615
- ...
616
- # Trace:
617
- # ERROR TEST Name: File Input Tests | testing a single failing js file works
618
- # ERROR TEST COMMAND: node cli.js tmp/test/failing-tests.js
619
- # Error: Command failed: node cli.js tmp/test/failing-tests.js
620
- #
621
- # at execute (file:///home/izelnakri/Github/qunitx/test/helpers/shell.js:27:13)
622
- # at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
623
- # at async file:///home/izelnakri/Github/qunitx/test/inputs/file-test.js:15:7
624
- # at async TestContext.<anonymous> (file:///home/izelnakri/Github/qunitx/shims/nodejs.js:21:12)
625
- # at async Test.run (node:internal/test_runner/test:570:9)
626
- # at async Suite.processPendingSubtests (node:internal/test_runner/test:316:7)
627
- # Subtest: testing a single failing js file works
628
- ok 2 - testing a single failing js file works
629
- ---
630
- duration_ms: 623.113119
631
- ...
632
- # Trace:
633
- # ERROR TEST Name: File Input Tests | testing a single passing js file with --browser works, console output supressed
634
- # ERROR TEST COMMAND: node cli.js tmp/test/passing-tests.js --browser
635
- # Error: Command failed: node cli.js tmp/test/passing-tests.js --browser
636
- # file:///home/izelnakri/Github/qunitx/lib/commands/run/tests-in-browser.js:94
637
- # let exception = new BundleError(error);
638
- # ^
639
- # BundleError: esbuild Bundle Error: TypeError: connections.server.close is not a function
640
- # at runTestsInBrowser (file:///home/izelnakri/Github/qunitx/lib/commands/run/tests-in-browser.js:94:21)
641
- # at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
642
- # at async default (file:///home/izelnakri/Github/qunitx/lib/commands/run.js:34:5)
643
- # at async file:///home/izelnakri/Github/qunitx/cli.js:23:10
644
- # Node.js v20.3.1
645
- #
646
- # at execute (file:///home/izelnakri/Github/qunitx/test/helpers/shell.js:27:13)
647
- # at async file:///home/izelnakri/Github/qunitx/test/inputs/file-test.js:97:24
648
- # at async TestContext.<anonymous> (file:///home/izelnakri/Github/qunitx/shims/nodejs.js:21:12)
649
- # at async Test.run (node:internal/test_runner/test:570:9)
650
- # at async Suite.processPendingSubtests (node:internal/test_runner/test:316:7)
651
- # Subtest: testing a single passing js file with --browser works, console output supressed
652
- not ok 3 - testing a single passing js file with --browser works, console output supressed
653
- ---
654
- duration_ms: 1400.884482
655
- failureType: 'testCodeFailure'
656
- error: |-
657
- Command failed: node cli.js tmp/test/passing-tests.js --browser
658
- file:///home/izelnakri/Github/qunitx/lib/commands/run/tests-in-browser.js:94
659
- let exception = new BundleError(error);
660
- ^
661
-
662
- BundleError: esbuild Bundle Error: TypeError: connections.server.close is not a function
663
- at runTestsInBrowser (file:///home/izelnakri/Github/qunitx/lib/commands/run/tests-in-browser.js:94:21)
664
- at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
665
- at async default (file:///home/izelnakri/Github/qunitx/lib/commands/run.js:34:5)
666
- at async file:///home/izelnakri/Github/qunitx/cli.js:23:10
667
-
668
- Node.js v20.3.1
669
-
670
- code: 1
671
- stack: |-
672
- runTestsInBrowser (file:///home/izelnakri/Github/qunitx/lib/commands/run/tests-in-browser.js:94:21)
673
- process.processTicksAndRejections (node:internal/process/task_queues:95:5)
674
- async default (file:///home/izelnakri/Github/qunitx/lib/commands/run.js:34:5)
675
- async file:///home/izelnakri/Github/qunitx/cli.js:23:10
676
- ChildProcess.exithandler (node:child_process:419:12)
677
- ChildProcess.emit (node:events:511:28)
678
- maybeClose (node:internal/child_process:1098:16)
679
- Socket.<anonymous> (node:internal/child_process:456:11)
680
- Socket.emit (node:events:511:28)
681
- Pipe.<anonymous> (node:net:334:12)
682
- ...
683
- # Trace:
684
- # ERROR TEST Name: File Input Tests | testing a single passing js file with --browser --debug works
685
- # ERROR TEST COMMAND: node cli.js tmp/test/passing-tests.js --browser --debug
686
- # Error: Command failed: node cli.js tmp/test/passing-tests.js --browser --debug
687
- # file:///home/izelnakri/Github/qunitx/lib/commands/run/tests-in-browser.js:94
688
- # let exception = new BundleError(error);
689
- # ^
690
- # BundleError: esbuild Bundle Error: TypeError: connections.server.close is not a function
691
- # at runTestsInBrowser (file:///home/izelnakri/Github/qunitx/lib/commands/run/tests-in-browser.js:94:21)
692
- # at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
693
- # at async default (file:///home/izelnakri/Github/qunitx/lib/commands/run.js:34:5)
694
- # at async file:///home/izelnakri/Github/qunitx/cli.js:23:10
695
- # Node.js v20.3.1
696
- #
697
- # at execute (file:///home/izelnakri/Github/qunitx/test/helpers/shell.js:27:13)
698
- # at async file:///home/izelnakri/Github/qunitx/test/inputs/file-test.js:104:24
699
- # at async TestContext.<anonymous> (file:///home/izelnakri/Github/qunitx/shims/nodejs.js:21:12)
700
- # at async Test.run (node:internal/test_runner/test:570:9)
701
- # at async Suite.processPendingSubtests (node:internal/test_runner/test:316:7)
702
- # Subtest: testing a single passing js file with --browser --debug works
703
- not ok 4 - testing a single passing js file with --browser --debug works
704
- ---
705
- duration_ms: 1548.493017
706
- failureType: 'testCodeFailure'
707
- error: |-
708
- Command failed: node cli.js tmp/test/passing-tests.js --browser --debug
709
- file:///home/izelnakri/Github/qunitx/lib/commands/run/tests-in-browser.js:94
710
- let exception = new BundleError(error);
711
- ^
712
-
713
- BundleError: esbuild Bundle Error: TypeError: connections.server.close is not a function
714
- at runTestsInBrowser (file:///home/izelnakri/Github/qunitx/lib/commands/run/tests-in-browser.js:94:21)
715
- at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
716
- at async default (file:///home/izelnakri/Github/qunitx/lib/commands/run.js:34:5)
717
- at async file:///home/izelnakri/Github/qunitx/cli.js:23:10
718
-
719
- Node.js v20.3.1
720
-
721
- code: 1
722
- stack: |-
723
- runTestsInBrowser (file:///home/izelnakri/Github/qunitx/lib/commands/run/tests-in-browser.js:94:21)
724
- process.processTicksAndRejections (node:internal/process/task_queues:95:5)
725
- async default (file:///home/izelnakri/Github/qunitx/lib/commands/run.js:34:5)
726
- async file:///home/izelnakri/Github/qunitx/cli.js:23:10
727
- ChildProcess.exithandler (node:child_process:419:12)
728
- ChildProcess.emit (node:events:511:28)
729
- maybeClose (node:internal/child_process:1098:16)
730
- Socket.<anonymous> (node:internal/child_process:456:11)
731
- Socket.emit (node:events:511:28)
732
- Pipe.<anonymous> (node:net:334:12)
733
- ...
734
- # Trace:
735
- # ERROR TEST Name: File Input Tests | testing a single failing js with --browser file works
736
- # ERROR TEST COMMAND: node cli.js tmp/test/failing-tests.js --browser
737
- # Error: Command failed: node cli.js tmp/test/failing-tests.js --browser
738
- # file:///home/izelnakri/Github/qunitx/lib/commands/run/tests-in-browser.js:94
739
- # let exception = new BundleError(error);
740
- # ^
741
- # BundleError: esbuild Bundle Error: TypeError: connections.server.close is not a function
742
- # at runTestsInBrowser (file:///home/izelnakri/Github/qunitx/lib/commands/run/tests-in-browser.js:94:21)
743
- # at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
744
- # at async default (file:///home/izelnakri/Github/qunitx/lib/commands/run.js:34:5)
745
- # at async file:///home/izelnakri/Github/qunitx/cli.js:23:10
746
- # Node.js v20.3.1
747
- #
748
- # at execute (file:///home/izelnakri/Github/qunitx/test/helpers/shell.js:27:13)
749
- # at async file:///home/izelnakri/Github/qunitx/test/inputs/file-test.js:114:24
750
- # at async TestContext.<anonymous> (file:///home/izelnakri/Github/qunitx/shims/nodejs.js:21:12)
751
- # at async Test.run (node:internal/test_runner/test:570:9)
752
- # at async Suite.processPendingSubtests (node:internal/test_runner/test:316:7)
753
- # Subtest: testing a single failing js with --browser file works
754
- ok 5 - testing a single failing js with --browser file works
755
- ---
756
- duration_ms: 1555.86097
757
- ...
758
- # Trace:
759
- # ERROR TEST Name: File Input Tests | testing a single failing js file with --browser --debug works
760
- # ERROR TEST COMMAND: node cli.js tmp/test/failing-tests.js --browser --debug
761
- # Error: Command failed: node cli.js tmp/test/failing-tests.js --browser --debug
762
- # file:///home/izelnakri/Github/qunitx/lib/commands/run/tests-in-browser.js:94
763
- # let exception = new BundleError(error);
764
- # ^
765
- # BundleError: esbuild Bundle Error: TypeError: connections.server.close is not a function
766
- # at runTestsInBrowser (file:///home/izelnakri/Github/qunitx/lib/commands/run/tests-in-browser.js:94:21)
767
- # at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
768
- # at async default (file:///home/izelnakri/Github/qunitx/lib/commands/run.js:34:5)
769
- # at async file:///home/izelnakri/Github/qunitx/cli.js:23:10
770
- # Node.js v20.3.1
771
- #
772
- # at execute (file:///home/izelnakri/Github/qunitx/test/helpers/shell.js:27:13)
773
- # at async file:///home/izelnakri/Github/qunitx/test/inputs/file-test.js:124:7
774
- # at async TestContext.<anonymous> (file:///home/izelnakri/Github/qunitx/shims/nodejs.js:21:12)
775
- # at async Test.run (node:internal/test_runner/test:570:9)
776
- # at async Suite.processPendingSubtests (node:internal/test_runner/test:316:7)
777
- # Subtest: testing a single failing js file with --browser --debug works
778
- ok 6 - testing a single failing js file with --browser --debug works
779
- ---
780
- duration_ms: 1467.042485
781
- ...