mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
test_runner: support expecting a test-case to fail
Co-Authored-By: Alejandro Espa <98526766+vespa7@users.noreply.github.com> PR-URL: https://github.com/nodejs/node/pull/60669 Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Jordan Harband <ljharb@gmail.com>
This commit is contained in:
1 parent
8e48e72f2a
commit
d77f98c4b6
22 files changed
+806
-493
No files matched your search
@@ -224,6 +224,57 @@ test('todo() method with message', (t) => {
|
||||
});
|
||||
```
|
||||
|
||||
## Expecting tests to fail
|
||||
|
||||
<!-- YAML
|
||||
added:
|
||||
- REPLACEME
|
||||
-->
|
||||
|
||||
This flips the pass/fail reporting for a specific test or suite: A flagged test/test-case must throw
|
||||
in order to "pass"; a test/test-case that does not throw, fails.
|
||||
|
||||
In the following, `doTheThing()` returns _currently_ `false` (`false` does not equal `true`, causing
|
||||
`strictEqual` to throw, so the test-case passes).
|
||||
|
||||
```js
|
||||
it.expectFailure('should do the thing', () => {
|
||||
assert.strictEqual(doTheThing(), true);
|
||||
});
|
||||
|
||||
it('should do the thing', { expectFailure: true }, () => {
|
||||
assert.strictEqual(doTheThing(), true);
|
||||
});
|
||||
```
|
||||
|
||||
`skip` and/or `todo` are mutually exclusive to `expectFailure`, and `skip` or `todo`
|
||||
will "win" when both are applied (`skip` wins against both, and `todo` wins
|
||||
against `expectFailure`).
|
||||
|
||||
These tests will be skipped (and not run):
|
||||
|
||||
```js
|
||||
it.expectFailure('should do the thing', { skip: true }, () => {
|
||||
assert.strictEqual(doTheThing(), true);
|
||||
});
|
||||
|
||||
it.skip('should do the thing', { expectFailure: true }, () => {
|
||||
assert.strictEqual(doTheThing(), true);
|
||||
});
|
||||
```
|
||||
|
||||
These tests will be marked "todo" (silencing errors):
|
||||
|
||||
```js
|
||||
it.expectFailure('should do the thing', { todo: true }, () => {
|
||||
assert.strictEqual(doTheThing(), true);
|
||||
});
|
||||
|
||||
it.todo('should do the thing', { expectFailure: true }, () => {
|
||||
assert.strictEqual(doTheThing(), true);
|
||||
});
|
||||
```
|
||||
|
||||
## `describe()` and `it()` aliases
|
||||
|
||||
Suites and tests can also be written using the `describe()` and `it()`
|
||||
|
||||
@@ -377,7 +377,7 @@ function runInParentContext(Factory) {
|
||||
|
||||
return run(name, options, fn, overrides);
|
||||
};
|
||||
ArrayPrototypeForEach(['skip', 'todo', 'only'], (keyword) => {
|
||||
ArrayPrototypeForEach(['expectFailure', 'skip', 'todo', 'only'], (keyword) => {
|
||||
test[keyword] = (name, options, fn) => {
|
||||
const overrides = {
|
||||
__proto__: null,
|
||||
|
||||
@@ -33,12 +33,12 @@ async function * tapReporter(source) {
|
||||
for await (const { type, data } of source) {
|
||||
switch (type) {
|
||||
case 'test:fail': {
|
||||
yield reportTest(data.nesting, data.testNumber, 'not ok', data.name, data.skip, data.todo);
|
||||
yield reportTest(data.nesting, data.testNumber, 'not ok', data.name, data.skip, data.todo, data.expectFailure);
|
||||
const location = data.file ? `${data.file}:${data.line}:${data.column}` : null;
|
||||
yield reportDetails(data.nesting, data.details, location);
|
||||
break;
|
||||
} case 'test:pass':
|
||||
yield reportTest(data.nesting, data.testNumber, 'ok', data.name, data.skip, data.todo);
|
||||
yield reportTest(data.nesting, data.testNumber, 'ok', data.name, data.skip, data.todo, data.expectFailure);
|
||||
yield reportDetails(data.nesting, data.details, null);
|
||||
break;
|
||||
case 'test:plan':
|
||||
@@ -65,7 +65,7 @@ async function * tapReporter(source) {
|
||||
}
|
||||
}
|
||||
|
||||
function reportTest(nesting, testNumber, status, name, skip, todo) {
|
||||
function reportTest(nesting, testNumber, status, name, skip, todo, expectFailure) {
|
||||
let line = `${indent(nesting)}${status} ${testNumber}`;
|
||||
|
||||
if (name) {
|
||||
@@ -76,6 +76,8 @@ function reportTest(nesting, testNumber, status, name, skip, todo) {
|
||||
line += ` # SKIP${typeof skip === 'string' && skip.length ? ` ${tapEscape(skip)}` : ''}`;
|
||||
} else if (todo !== undefined) {
|
||||
line += ` # TODO${typeof todo === 'string' && todo.length ? ` ${tapEscape(todo)}` : ''}`;
|
||||
} else if (expectFailure !== undefined) {
|
||||
line += ' # EXPECTED FAILURE';
|
||||
}
|
||||
|
||||
line += '\n';
|
||||
|
||||
@@ -70,7 +70,7 @@ function formatError(error, indent) {
|
||||
function formatTestReport(type, data, showErrorDetails = true, prefix = '', indent = '') {
|
||||
let color = reporterColorMap[type] ?? colors.white;
|
||||
let symbol = reporterUnicodeSymbolMap[type] ?? ' ';
|
||||
const { skip, todo } = data;
|
||||
const { skip, todo, expectFailure } = data;
|
||||
const duration_ms = data.details?.duration_ms ? ` ${colors.gray}(${data.details.duration_ms}ms)${colors.white}` : '';
|
||||
let title = `${data.name}${duration_ms}`;
|
||||
|
||||
@@ -78,6 +78,8 @@ function formatTestReport(type, data, showErrorDetails = true, prefix = '', inde
|
||||
title += ` # ${typeof skip === 'string' && skip.length ? skip : 'SKIP'}`;
|
||||
} else if (todo !== undefined) {
|
||||
title += ` # ${typeof todo === 'string' && todo.length ? todo : 'TODO'}`;
|
||||
} else if (expectFailure !== undefined) {
|
||||
title += ` # EXPECTED FAILURE`;
|
||||
}
|
||||
|
||||
const err = showErrorDetails && data.details?.error ? formatError(data.details.error, indent) : '';
|
||||
|
||||
@@ -496,7 +496,7 @@ class Test extends AsyncResource {
|
||||
super('Test');
|
||||
|
||||
let { fn, name, parent } = options;
|
||||
const { concurrency, entryFile, loc, only, timeout, todo, skip, signal, plan } = options;
|
||||
const { concurrency, entryFile, expectFailure, loc, only, timeout, todo, skip, signal, plan } = options;
|
||||
|
||||
if (typeof fn !== 'function') {
|
||||
fn = noop;
|
||||
@@ -635,6 +635,7 @@ class Test extends AsyncResource {
|
||||
this.plan = null;
|
||||
this.expectedAssertions = plan;
|
||||
this.cancelled = false;
|
||||
this.expectFailure = expectFailure !== undefined && expectFailure !== false;
|
||||
this.skipped = skip !== undefined && skip !== false;
|
||||
this.isTodo = (todo !== undefined && todo !== false) || this.parent?.isTodo;
|
||||
this.startTime = null;
|
||||
@@ -946,7 +947,12 @@ class Test extends AsyncResource {
|
||||
return;
|
||||
}
|
||||
|
||||
this.passed = false;
|
||||
if (this.expectFailure === true) {
|
||||
this.passed = true;
|
||||
} else {
|
||||
this.passed = false;
|
||||
}
|
||||
|
||||
this.error = err;
|
||||
}
|
||||
|
||||
@@ -1343,6 +1349,8 @@ class Test extends AsyncResource {
|
||||
directive = this.reporter.getSkip(this.message);
|
||||
} else if (this.isTodo) {
|
||||
directive = this.reporter.getTodo(this.message);
|
||||
} else if (this.expectFailure) {
|
||||
directive = this.reporter.getXFail(this.expectFailure); // TODO(@JakobJingleheimer): support specifying failure
|
||||
}
|
||||
|
||||
if (this.reportedType) {
|
||||
@@ -1357,6 +1365,7 @@ class Test extends AsyncResource {
|
||||
if (this.passedAttempt !== undefined) {
|
||||
details.passed_on_attempt = this.passedAttempt;
|
||||
}
|
||||
|
||||
return { __proto__: null, details, directive };
|
||||
}
|
||||
|
||||
|
||||
@@ -87,6 +87,10 @@ class TestsStream extends Readable {
|
||||
return { __proto__: null, todo: reason ?? true };
|
||||
}
|
||||
|
||||
getXFail(expectation = undefined) {
|
||||
return { __proto__: null, expectFailure: expectation ?? true };
|
||||
}
|
||||
|
||||
enqueue(nesting, loc, name, type) {
|
||||
this[kEmitMessage]('test:enqueue', {
|
||||
__proto__: null,
|
||||
|
||||
+24
-1
@@ -5,8 +5,23 @@ const { describe, it, test } = require('node:test');
|
||||
const util = require('util');
|
||||
|
||||
|
||||
it.todo('sync pass todo', () => {
|
||||
it.expectFailure('sync expect fail (method)', () => {
|
||||
throw new Error('should pass');
|
||||
});
|
||||
|
||||
it('sync expect fail (options)', { expectFailure: true }, () => {
|
||||
throw new Error('should pass');
|
||||
});
|
||||
|
||||
it.expectFailure('async expect fail (method)', async () => {
|
||||
throw new Error('should pass');
|
||||
});
|
||||
|
||||
it('async expect fail (options)', { expectFailure: true }, async () => {
|
||||
throw new Error('should pass');
|
||||
});
|
||||
|
||||
it.todo('sync pass todo', () => {
|
||||
});
|
||||
|
||||
it('sync pass todo with message', { todo: 'this is a passing todo' }, () => {
|
||||
@@ -16,6 +31,10 @@ it.todo('sync todo', () => {
|
||||
throw new Error('should not count as a failure');
|
||||
});
|
||||
|
||||
it.todo('sync todo with expect fail', { expectFailure: true }, () => {
|
||||
throw new Error('should not count as an expected failure');
|
||||
});
|
||||
|
||||
it('sync todo with message', { todo: 'this is a failing todo' }, () => {
|
||||
throw new Error('should not count as a failure');
|
||||
});
|
||||
@@ -23,6 +42,10 @@ it('sync todo with message', { todo: 'this is a failing todo' }, () => {
|
||||
it.skip('sync skip pass', () => {
|
||||
});
|
||||
|
||||
it.skip('sync skip expect fail', { expectFailure: true }, () => {
|
||||
throw new Error('should not fail');
|
||||
});
|
||||
|
||||
it('sync skip pass with message', { skip: 'this is skipped' }, () => {
|
||||
});
|
||||
|
||||
|
||||
+99
-63
@@ -1,18 +1,42 @@
|
||||
TAP version 13
|
||||
# Subtest: sync expect fail (method)
|
||||
ok 1 - sync expect fail (method) # EXPECTED FAILURE
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: sync expect fail (options)
|
||||
ok 2 - sync expect fail (options) # EXPECTED FAILURE
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: async expect fail (method)
|
||||
ok 3 - async expect fail (method) # EXPECTED FAILURE
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: async expect fail (options)
|
||||
ok 4 - async expect fail (options) # EXPECTED FAILURE
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: sync pass todo
|
||||
ok 1 - sync pass todo # TODO
|
||||
ok 5 - sync pass todo # TODO
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: sync pass todo with message
|
||||
ok 2 - sync pass todo with message # TODO this is a passing todo
|
||||
ok 6 - sync pass todo with message # TODO this is a passing todo
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: sync todo
|
||||
not ok 3 - sync todo # TODO
|
||||
not ok 7 - sync todo # TODO
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -29,8 +53,14 @@ not ok 3 - sync todo # TODO
|
||||
*
|
||||
*
|
||||
...
|
||||
# Subtest: sync todo with expect fail
|
||||
ok 8 - sync todo with expect fail # TODO
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: sync todo with message
|
||||
not ok 4 - sync todo with message # TODO this is a failing todo
|
||||
not ok 9 - sync todo with message # TODO this is a failing todo
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -48,25 +78,31 @@ not ok 4 - sync todo with message # TODO this is a failing todo
|
||||
*
|
||||
...
|
||||
# Subtest: sync skip pass
|
||||
ok 5 - sync skip pass # SKIP
|
||||
ok 10 - sync skip pass # SKIP
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: sync skip expect fail
|
||||
ok 11 - sync skip expect fail # SKIP
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: sync skip pass with message
|
||||
ok 6 - sync skip pass with message # SKIP this is skipped
|
||||
ok 12 - sync skip pass with message # SKIP this is skipped
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: sync pass
|
||||
ok 7 - sync pass
|
||||
ok 13 - sync pass
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: sync throw fail
|
||||
not ok 8 - sync throw fail
|
||||
not ok 14 - sync throw fail
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -84,25 +120,25 @@ not ok 8 - sync throw fail
|
||||
*
|
||||
...
|
||||
# Subtest: async skip pass
|
||||
ok 9 - async skip pass # SKIP
|
||||
ok 15 - async skip pass # SKIP
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: async pass
|
||||
ok 10 - async pass
|
||||
ok 16 - async pass
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: mixing describe/it and test should work
|
||||
ok 11 - mixing describe/it and test should work
|
||||
ok 17 - mixing describe/it and test should work
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: async throw fail
|
||||
not ok 12 - async throw fail
|
||||
not ok 18 - async throw fail
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -120,7 +156,7 @@ not ok 12 - async throw fail
|
||||
*
|
||||
...
|
||||
# Subtest: async skip fail
|
||||
not ok 13 - async skip fail # SKIP
|
||||
not ok 19 - async skip fail # SKIP
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -130,7 +166,7 @@ not ok 13 - async skip fail # SKIP
|
||||
code: 'ERR_TEST_FAILURE'
|
||||
...
|
||||
# Subtest: async assertion fail
|
||||
not ok 14 - async assertion fail
|
||||
not ok 20 - async assertion fail
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -156,13 +192,13 @@ not ok 14 - async assertion fail
|
||||
*
|
||||
...
|
||||
# Subtest: resolve pass
|
||||
ok 15 - resolve pass
|
||||
ok 21 - resolve pass
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: reject fail
|
||||
not ok 16 - reject fail
|
||||
not ok 22 - reject fail
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -180,31 +216,31 @@ not ok 16 - reject fail
|
||||
*
|
||||
...
|
||||
# Subtest: unhandled rejection - passes but warns
|
||||
ok 17 - unhandled rejection - passes but warns
|
||||
ok 23 - unhandled rejection - passes but warns
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: async unhandled rejection - passes but warns
|
||||
ok 18 - async unhandled rejection - passes but warns
|
||||
ok 24 - async unhandled rejection - passes but warns
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: immediate throw - passes but warns
|
||||
ok 19 - immediate throw - passes but warns
|
||||
ok 25 - immediate throw - passes but warns
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: immediate reject - passes but warns
|
||||
ok 20 - immediate reject - passes but warns
|
||||
ok 26 - immediate reject - passes but warns
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: immediate resolve pass
|
||||
ok 21 - immediate resolve pass
|
||||
ok 27 - immediate resolve pass
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -238,7 +274,7 @@ ok 21 - immediate resolve pass
|
||||
type: 'test'
|
||||
...
|
||||
1..2
|
||||
not ok 22 - subtest sync throw fail
|
||||
not ok 28 - subtest sync throw fail
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'suite'
|
||||
@@ -248,7 +284,7 @@ not ok 22 - subtest sync throw fail
|
||||
code: 'ERR_TEST_FAILURE'
|
||||
...
|
||||
# Subtest: sync throw non-error fail
|
||||
not ok 23 - sync throw non-error fail
|
||||
not ok 29 - sync throw non-error fail
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -283,31 +319,31 @@ not ok 23 - sync throw non-error fail
|
||||
type: 'test'
|
||||
...
|
||||
1..4
|
||||
ok 24 - level 0a
|
||||
ok 30 - level 0a
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'suite'
|
||||
...
|
||||
# Subtest: invalid subtest - pass but subtest fails
|
||||
ok 25 - invalid subtest - pass but subtest fails
|
||||
ok 31 - invalid subtest - pass but subtest fails
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'suite'
|
||||
...
|
||||
# Subtest: sync skip option
|
||||
ok 26 - sync skip option # SKIP
|
||||
ok 32 - sync skip option # SKIP
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: sync skip option with message
|
||||
ok 27 - sync skip option with message # SKIP this is skipped
|
||||
ok 33 - sync skip option with message # SKIP this is skipped
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: sync skip option is false fail
|
||||
not ok 28 - sync skip option is false fail
|
||||
not ok 34 - sync skip option is false fail
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -325,61 +361,61 @@ not ok 28 - sync skip option is false fail
|
||||
*
|
||||
...
|
||||
# Subtest: <anonymous>
|
||||
ok 29 - <anonymous>
|
||||
ok 35 - <anonymous>
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: functionOnly
|
||||
ok 30 - functionOnly
|
||||
ok 36 - functionOnly
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: <anonymous>
|
||||
ok 31 - <anonymous>
|
||||
ok 37 - <anonymous>
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: test with only a name provided
|
||||
ok 32 - test with only a name provided
|
||||
ok 38 - test with only a name provided
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: <anonymous>
|
||||
ok 33 - <anonymous>
|
||||
ok 39 - <anonymous>
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: <anonymous>
|
||||
ok 34 - <anonymous> # SKIP
|
||||
ok 40 - <anonymous> # SKIP
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: test with a name and options provided
|
||||
ok 35 - test with a name and options provided # SKIP
|
||||
ok 41 - test with a name and options provided # SKIP
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: functionAndOptions
|
||||
ok 36 - functionAndOptions # SKIP
|
||||
ok 42 - functionAndOptions # SKIP
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: callback pass
|
||||
ok 37 - callback pass
|
||||
ok 43 - callback pass
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: callback fail
|
||||
not ok 38 - callback fail
|
||||
not ok 44 - callback fail
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -392,25 +428,25 @@ not ok 38 - callback fail
|
||||
*
|
||||
...
|
||||
# Subtest: sync t is this in test
|
||||
ok 39 - sync t is this in test
|
||||
ok 45 - sync t is this in test
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: async t is this in test
|
||||
ok 40 - async t is this in test
|
||||
ok 46 - async t is this in test
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: callback t is this in test
|
||||
ok 41 - callback t is this in test
|
||||
ok 47 - callback t is this in test
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: callback also returns a Promise
|
||||
not ok 42 - callback also returns a Promise
|
||||
not ok 48 - callback also returns a Promise
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -420,7 +456,7 @@ not ok 42 - callback also returns a Promise
|
||||
code: 'ERR_TEST_FAILURE'
|
||||
...
|
||||
# Subtest: callback throw
|
||||
not ok 43 - callback throw
|
||||
not ok 49 - callback throw
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -438,7 +474,7 @@ not ok 43 - callback throw
|
||||
*
|
||||
...
|
||||
# Subtest: callback called twice
|
||||
not ok 44 - callback called twice
|
||||
not ok 50 - callback called twice
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -451,13 +487,13 @@ not ok 44 - callback called twice
|
||||
*
|
||||
...
|
||||
# Subtest: callback called twice in different ticks
|
||||
ok 45 - callback called twice in different ticks
|
||||
ok 51 - callback called twice in different ticks
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: callback called twice in future tick
|
||||
not ok 46 - callback called twice in future tick
|
||||
not ok 52 - callback called twice in future tick
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -469,7 +505,7 @@ not ok 46 - callback called twice in future tick
|
||||
*
|
||||
...
|
||||
# Subtest: callback async throw
|
||||
not ok 47 - callback async throw
|
||||
not ok 53 - callback async throw
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -482,13 +518,13 @@ not ok 47 - callback async throw
|
||||
*
|
||||
...
|
||||
# Subtest: callback async throw after done
|
||||
ok 48 - callback async throw after done
|
||||
ok 54 - callback async throw after done
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: custom inspect symbol fail
|
||||
not ok 49 - custom inspect symbol fail
|
||||
not ok 55 - custom inspect symbol fail
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -498,7 +534,7 @@ not ok 49 - custom inspect symbol fail
|
||||
code: 'ERR_TEST_FAILURE'
|
||||
...
|
||||
# Subtest: custom inspect symbol that throws fail
|
||||
not ok 50 - custom inspect symbol that throws fail
|
||||
not ok 56 - custom inspect symbol that throws fail
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -554,7 +590,7 @@ not ok 50 - custom inspect symbol that throws fail
|
||||
*
|
||||
...
|
||||
1..2
|
||||
not ok 51 - subtest sync throw fails
|
||||
not ok 57 - subtest sync throw fails
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'suite'
|
||||
@@ -575,7 +611,7 @@ not ok 51 - subtest sync throw fails
|
||||
code: 'ERR_TEST_FAILURE'
|
||||
...
|
||||
1..1
|
||||
not ok 52 - describe sync throw fails
|
||||
not ok 58 - describe sync throw fails
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'suite'
|
||||
@@ -607,7 +643,7 @@ not ok 52 - describe sync throw fails
|
||||
code: 'ERR_TEST_FAILURE'
|
||||
...
|
||||
1..1
|
||||
not ok 53 - describe async throw fails
|
||||
not ok 59 - describe async throw fails
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'suite'
|
||||
@@ -663,7 +699,7 @@ not ok 53 - describe async throw fails
|
||||
type: 'test'
|
||||
...
|
||||
1..4
|
||||
not ok 54 - timeouts
|
||||
not ok 60 - timeouts
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'suite'
|
||||
@@ -692,7 +728,7 @@ not ok 54 - timeouts
|
||||
*
|
||||
...
|
||||
1..2
|
||||
not ok 55 - successful thenable
|
||||
not ok 61 - successful thenable
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'suite'
|
||||
@@ -702,7 +738,7 @@ not ok 55 - successful thenable
|
||||
code: 'ERR_TEST_FAILURE'
|
||||
...
|
||||
# Subtest: rejected thenable
|
||||
not ok 56 - rejected thenable
|
||||
not ok 62 - rejected thenable
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'suite'
|
||||
@@ -740,13 +776,13 @@ not ok 56 - rejected thenable
|
||||
type: 'suite'
|
||||
...
|
||||
1..3
|
||||
ok 57 - async describe function
|
||||
ok 63 - async describe function
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'suite'
|
||||
...
|
||||
# Subtest: invalid subtest fail
|
||||
not ok 58 - invalid subtest fail
|
||||
not ok 64 - invalid subtest fail
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -757,18 +793,18 @@ not ok 58 - invalid subtest fail
|
||||
stack: |-
|
||||
*
|
||||
...
|
||||
1..58
|
||||
1..64
|
||||
# Error: Test "unhandled rejection - passes but warns" at test/fixtures/test-runner/output/describe_it.js:(LINE):1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event.
|
||||
# Error: Test "async unhandled rejection - passes but warns" at test/fixtures/test-runner/output/describe_it.js:(LINE):1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from async unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event.
|
||||
# Error: Test "immediate throw - passes but warns" at test/fixtures/test-runner/output/describe_it.js:(LINE):1 generated asynchronous activity after the test ended. This activity created the error "Error: thrown from immediate throw fail" and would have caused the test to fail, but instead triggered an uncaughtException event.
|
||||
# Error: Test "immediate reject - passes but warns" at test/fixtures/test-runner/output/describe_it.js:(LINE):1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from immediate reject fail" and would have caused the test to fail, but instead triggered an unhandledRejection event.
|
||||
# Error: Test "callback called twice in different ticks" at test/fixtures/test-runner/output/describe_it.js:(LINE):1 generated asynchronous activity after the test ended. This activity created the error "Error [ERR_TEST_FAILURE]: callback invoked multiple times" and would have caused the test to fail, but instead triggered an uncaughtException event.
|
||||
# Error: Test "callback async throw after done" at test/fixtures/test-runner/output/describe_it.js:(LINE):1 generated asynchronous activity after the test ended. This activity created the error "Error: thrown from callback async throw after done" and would have caused the test to fail, but instead triggered an uncaughtException event.
|
||||
# tests 67
|
||||
# tests 73
|
||||
# suites 11
|
||||
# pass 31
|
||||
# pass 35
|
||||
# fail 19
|
||||
# cancelled 4
|
||||
# skipped 9
|
||||
# todo 4
|
||||
# skipped 10
|
||||
# todo 5
|
||||
# duration_ms *
|
||||
+9
-2
@@ -3,5 +3,12 @@ require('../../../common');
|
||||
const fixtures = require('../../../common/fixtures');
|
||||
const spawn = require('node:child_process').spawn;
|
||||
|
||||
spawn(process.execPath,
|
||||
['--no-warnings', '--test-reporter', 'dot', fixtures.path('test-runner/output/output.js')], { stdio: 'inherit' });
|
||||
spawn(
|
||||
process.execPath,
|
||||
[
|
||||
'--no-warnings',
|
||||
'--test-reporter', 'dot',
|
||||
fixtures.path('test-runner/output/output.js'),
|
||||
],
|
||||
{ stdio: 'inherit' },
|
||||
);
|
||||
+5
-4
@@ -1,7 +1,8 @@
|
||||
..XX...X..XXX.X.....
|
||||
XXX............X....
|
||||
.....X...XXX.XX.....
|
||||
XXXXXXX...XXXXX
|
||||
........XX...X..XXX.
|
||||
X.....XXX...........
|
||||
.X.........X...XXX.X
|
||||
X.....XXXXXXX...XXXX
|
||||
X
|
||||
|
||||
Failed tests:
|
||||
|
||||
|
||||
+9
-6
@@ -3,9 +3,12 @@ require('../../../common');
|
||||
const fixtures = require('../../../common/fixtures');
|
||||
const spawn = require('node:child_process').spawn;
|
||||
|
||||
spawn(process.execPath,
|
||||
[
|
||||
'--no-warnings', '--test-reporter', 'junit',
|
||||
fixtures.path('test-runner/output/output.js'),
|
||||
],
|
||||
{ stdio: 'inherit' });
|
||||
spawn(
|
||||
process.execPath,
|
||||
[
|
||||
'--no-warnings',
|
||||
'--test-reporter', 'junit',
|
||||
fixtures.path('test-runner/output/output.js'),
|
||||
],
|
||||
{ stdio: 'inherit' },
|
||||
);
|
||||
+20
-10
@@ -1,5 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<testsuites>
|
||||
<testcase name="sync expect fail (method)" time="*" classname="test" file="*"/>
|
||||
<testcase name="sync expect fail (options)" time="*" classname="test" file="*"/>
|
||||
<testcase name="async expect fail (method)" time="*" classname="test" file="*"/>
|
||||
<testcase name="async expect fail (options)" time="*" classname="test" file="*"/>
|
||||
<testcase name="sync todo with expect fail" time="*" classname="test" file="*">
|
||||
<skipped type="todo" message="true"/>
|
||||
</testcase>
|
||||
<testcase name="sync skip expect fail" time="*" classname="test" file="*">
|
||||
<skipped type="skipped" message="true"/>
|
||||
</testcase>
|
||||
<testcase name="sync pass todo" time="*" classname="test" file="*">
|
||||
<skipped type="todo" message="true"/>
|
||||
</testcase>
|
||||
@@ -508,19 +518,19 @@ Error [ERR_TEST_FAILURE]: test could not be started because its parent finished
|
||||
}
|
||||
</failure>
|
||||
</testcase>
|
||||
<!-- Error: Test "unhandled rejection - passes but warns" at test/fixtures/test-runner/output/output.js:72:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. -->
|
||||
<!-- Error: Test "async unhandled rejection - passes but warns" at test/fixtures/test-runner/output/output.js:76:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from async unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. -->
|
||||
<!-- Error: Test "unhandled rejection - passes but warns" at test/fixtures/test-runner/output/output.js:96:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. -->
|
||||
<!-- Error: Test "async unhandled rejection - passes but warns" at test/fixtures/test-runner/output/output.js:100:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from async unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. -->
|
||||
<!-- Error: A resource generated asynchronous activity after the test ended. This activity created the error "Error: uncaught from outside of a test" which triggered an uncaughtException event, caught by the test runner. -->
|
||||
<!-- Error: Test "immediate throw - passes but warns" at test/fixtures/test-runner/output/output.js:80:1 generated asynchronous activity after the test ended. This activity created the error "Error: thrown from immediate throw fail" and would have caused the test to fail, but instead triggered an uncaughtException event. -->
|
||||
<!-- Error: Test "immediate reject - passes but warns" at test/fixtures/test-runner/output/output.js:86:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from immediate reject fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. -->
|
||||
<!-- Error: Test "callback called twice in different ticks" at test/fixtures/test-runner/output/output.js:251:1 generated asynchronous activity after the test ended. This activity created the error "Error [ERR_TEST_FAILURE]: callback invoked multiple times" and would have caused the test to fail, but instead triggered an uncaughtException event. -->
|
||||
<!-- Error: Test "callback async throw after done" at test/fixtures/test-runner/output/output.js:269:1 generated asynchronous activity after the test ended. This activity created the error "Error: thrown from callback async throw after done" and would have caused the test to fail, but instead triggered an uncaughtException event. -->
|
||||
<!-- tests 75 -->
|
||||
<!-- Error: Test "immediate throw - passes but warns" at test/fixtures/test-runner/output/output.js:104:1 generated asynchronous activity after the test ended. This activity created the error "Error: thrown from immediate throw fail" and would have caused the test to fail, but instead triggered an uncaughtException event. -->
|
||||
<!-- Error: Test "immediate reject - passes but warns" at test/fixtures/test-runner/output/output.js:110:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from immediate reject fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. -->
|
||||
<!-- Error: Test "callback called twice in different ticks" at test/fixtures/test-runner/output/output.js:275:1 generated asynchronous activity after the test ended. This activity created the error "Error [ERR_TEST_FAILURE]: callback invoked multiple times" and would have caused the test to fail, but instead triggered an uncaughtException event. -->
|
||||
<!-- Error: Test "callback async throw after done" at test/fixtures/test-runner/output/output.js:293:1 generated asynchronous activity after the test ended. This activity created the error "Error: thrown from callback async throw after done" and would have caused the test to fail, but instead triggered an uncaughtException event. -->
|
||||
<!-- tests 81 -->
|
||||
<!-- suites 0 -->
|
||||
<!-- pass 36 -->
|
||||
<!-- pass 40 -->
|
||||
<!-- fail 24 -->
|
||||
<!-- cancelled 2 -->
|
||||
<!-- skipped 9 -->
|
||||
<!-- todo 4 -->
|
||||
<!-- skipped 10 -->
|
||||
<!-- todo 5 -->
|
||||
<!-- duration_ms * -->
|
||||
</testsuites>
|
||||
+10
-10
@@ -3,14 +3,14 @@ require('../../../common');
|
||||
const fixtures = require('../../../common/fixtures');
|
||||
const spawn = require('node:child_process').spawn;
|
||||
|
||||
spawn(process.execPath,
|
||||
[
|
||||
'--no-warnings',
|
||||
'--experimental-test-coverage',
|
||||
'--test-coverage-exclude=!test/**',
|
||||
'--test-reporter',
|
||||
'lcov',
|
||||
fixtures.path('test-runner/output/output.js'),
|
||||
],
|
||||
{ stdio: 'inherit' },
|
||||
spawn(
|
||||
process.execPath,
|
||||
[
|
||||
'--no-warnings',
|
||||
'--experimental-test-coverage',
|
||||
'--test-coverage-exclude=!test/**',
|
||||
'--test-reporter', 'lcov',
|
||||
fixtures.path('test-runner/output/output.js'),
|
||||
],
|
||||
{ stdio: 'inherit' },
|
||||
);
|
||||
+260
-219
@@ -3,110 +3,116 @@ SF:test/fixtures/test-runner/output/output.js
|
||||
FN:8,anonymous_0
|
||||
FN:12,anonymous_1
|
||||
FN:16,anonymous_2
|
||||
FN:21,anonymous_3
|
||||
FN:26,anonymous_4
|
||||
FN:30,anonymous_5
|
||||
FN:34,anonymous_6
|
||||
FN:38,anonymous_7
|
||||
FN:42,anonymous_8
|
||||
FN:46,anonymous_9
|
||||
FN:20,anonymous_3
|
||||
FN:24,anonymous_4
|
||||
FN:28,anonymous_5
|
||||
FN:32,anonymous_6
|
||||
FN:36,anonymous_7
|
||||
FN:40,anonymous_8
|
||||
FN:45,anonymous_9
|
||||
FN:50,anonymous_10
|
||||
FN:54,anonymous_11
|
||||
FN:59,anonymous_12
|
||||
FN:64,anonymous_13
|
||||
FN:68,anonymous_14
|
||||
FN:72,anonymous_15
|
||||
FN:76,anonymous_16
|
||||
FN:80,anonymous_17
|
||||
FN:81,anonymous_18
|
||||
FN:86,anonymous_19
|
||||
FN:87,anonymous_20
|
||||
FN:92,anonymous_21
|
||||
FN:93,anonymous_22
|
||||
FN:94,anonymous_23
|
||||
FN:100,anonymous_24
|
||||
FN:101,anonymous_25
|
||||
FN:107,anonymous_26
|
||||
FN:111,anonymous_27
|
||||
FN:112,anonymous_28
|
||||
FN:113,anonymous_29
|
||||
FN:114,anonymous_30
|
||||
FN:122,anonymous_31
|
||||
FN:123,anonymous_32
|
||||
FN:130,anonymous_33
|
||||
FN:131,anonymous_34
|
||||
FN:132,anonymous_35
|
||||
FN:140,anonymous_36
|
||||
FN:141,anonymous_37
|
||||
FN:142,anonymous_38
|
||||
FN:150,anonymous_39
|
||||
FN:151,anonymous_40
|
||||
FN:159,anonymous_41
|
||||
FN:160,anonymous_42
|
||||
FN:161,anonymous_43
|
||||
FN:58,anonymous_12
|
||||
FN:62,anonymous_13
|
||||
FN:66,anonymous_14
|
||||
FN:70,anonymous_15
|
||||
FN:74,anonymous_16
|
||||
FN:78,anonymous_17
|
||||
FN:83,anonymous_18
|
||||
FN:88,anonymous_19
|
||||
FN:92,anonymous_20
|
||||
FN:96,anonymous_21
|
||||
FN:100,anonymous_22
|
||||
FN:104,anonymous_23
|
||||
FN:105,anonymous_24
|
||||
FN:110,anonymous_25
|
||||
FN:111,anonymous_26
|
||||
FN:116,anonymous_27
|
||||
FN:117,anonymous_28
|
||||
FN:118,anonymous_29
|
||||
FN:124,anonymous_30
|
||||
FN:125,anonymous_31
|
||||
FN:131,anonymous_32
|
||||
FN:135,anonymous_33
|
||||
FN:136,anonymous_34
|
||||
FN:137,anonymous_35
|
||||
FN:138,anonymous_36
|
||||
FN:146,anonymous_37
|
||||
FN:147,anonymous_38
|
||||
FN:154,anonymous_39
|
||||
FN:155,anonymous_40
|
||||
FN:156,anonymous_41
|
||||
FN:164,anonymous_42
|
||||
FN:165,anonymous_43
|
||||
FN:166,anonymous_44
|
||||
FN:167,anonymous_45
|
||||
FN:171,anonymous_46
|
||||
FN:172,anonymous_47
|
||||
FN:173,anonymous_48
|
||||
FN:179,anonymous_49
|
||||
FN:183,anonymous_50
|
||||
FN:187,anonymous_51
|
||||
FN:195,functionOnly
|
||||
FN:198,anonymous_53
|
||||
FN:213,functionAndOptions
|
||||
FN:215,anonymous_55
|
||||
FN:219,anonymous_56
|
||||
FN:220,anonymous_57
|
||||
FN:225,anonymous_58
|
||||
FN:229,anonymous_59
|
||||
FN:233,anonymous_60
|
||||
FN:238,anonymous_61
|
||||
FN:242,anonymous_62
|
||||
FN:246,anonymous_63
|
||||
FN:251,anonymous_64
|
||||
FN:256,anonymous_65
|
||||
FN:174,anonymous_45
|
||||
FN:175,anonymous_46
|
||||
FN:183,anonymous_47
|
||||
FN:184,anonymous_48
|
||||
FN:185,anonymous_49
|
||||
FN:190,anonymous_50
|
||||
FN:191,anonymous_51
|
||||
FN:195,anonymous_52
|
||||
FN:196,anonymous_53
|
||||
FN:197,anonymous_54
|
||||
FN:203,anonymous_55
|
||||
FN:207,anonymous_56
|
||||
FN:211,anonymous_57
|
||||
FN:219,functionOnly
|
||||
FN:222,anonymous_59
|
||||
FN:237,functionAndOptions
|
||||
FN:239,anonymous_61
|
||||
FN:243,anonymous_62
|
||||
FN:244,anonymous_63
|
||||
FN:249,anonymous_64
|
||||
FN:253,anonymous_65
|
||||
FN:257,anonymous_66
|
||||
FN:263,anonymous_67
|
||||
FN:264,anonymous_68
|
||||
FN:269,anonymous_69
|
||||
FN:270,anonymous_70
|
||||
FN:277,anonymous_71
|
||||
FN:287,anonymous_72
|
||||
FN:289,obj
|
||||
FN:298,anonymous_74
|
||||
FN:300,obj
|
||||
FN:309,anonymous_76
|
||||
FN:310,anonymous_77
|
||||
FN:313,anonymous_78
|
||||
FN:318,anonymous_79
|
||||
FN:319,anonymous_80
|
||||
FN:320,anonymous_81
|
||||
FN:327,anonymous_82
|
||||
FN:328,anonymous_83
|
||||
FN:335,anonymous_84
|
||||
FN:336,anonymous_85
|
||||
FN:341,anonymous_86
|
||||
FN:345,anonymous_87
|
||||
FN:348,get then
|
||||
FN:351,anonymous_89
|
||||
FN:356,anonymous_90
|
||||
FN:359,get then
|
||||
FN:362,anonymous_92
|
||||
FN:367,anonymous_93
|
||||
FN:368,anonymous_94
|
||||
FN:369,anonymous_95
|
||||
FN:373,anonymous_96
|
||||
FN:374,anonymous_97
|
||||
FN:375,anonymous_98
|
||||
FN:381,anonymous_99
|
||||
FN:385,anonymous_100
|
||||
FN:262,anonymous_67
|
||||
FN:266,anonymous_68
|
||||
FN:270,anonymous_69
|
||||
FN:275,anonymous_70
|
||||
FN:280,anonymous_71
|
||||
FN:281,anonymous_72
|
||||
FN:287,anonymous_73
|
||||
FN:288,anonymous_74
|
||||
FN:293,anonymous_75
|
||||
FN:294,anonymous_76
|
||||
FN:301,anonymous_77
|
||||
FN:311,anonymous_78
|
||||
FN:313,obj
|
||||
FN:322,anonymous_80
|
||||
FN:324,obj
|
||||
FN:333,anonymous_82
|
||||
FN:334,anonymous_83
|
||||
FN:337,anonymous_84
|
||||
FN:342,anonymous_85
|
||||
FN:343,anonymous_86
|
||||
FN:344,anonymous_87
|
||||
FN:351,anonymous_88
|
||||
FN:352,anonymous_89
|
||||
FN:359,anonymous_90
|
||||
FN:360,anonymous_91
|
||||
FN:365,anonymous_92
|
||||
FN:369,anonymous_93
|
||||
FN:372,get then
|
||||
FN:375,anonymous_95
|
||||
FN:380,anonymous_96
|
||||
FN:383,get then
|
||||
FN:386,anonymous_98
|
||||
FN:391,anonymous_99
|
||||
FN:392,anonymous_100
|
||||
FN:393,anonymous_101
|
||||
FN:397,anonymous_102
|
||||
FN:398,anonymous_103
|
||||
FN:399,anonymous_104
|
||||
FN:405,anonymous_105
|
||||
FN:409,anonymous_106
|
||||
FNDA:1,anonymous_0
|
||||
FNDA:1,anonymous_1
|
||||
FNDA:1,anonymous_2
|
||||
FNDA:1,anonymous_3
|
||||
FNDA:1,anonymous_4
|
||||
FNDA:1,anonymous_5
|
||||
FNDA:0,anonymous_5
|
||||
FNDA:1,anonymous_6
|
||||
FNDA:1,anonymous_7
|
||||
FNDA:1,anonymous_8
|
||||
@@ -150,18 +156,18 @@ FNDA:1,anonymous_45
|
||||
FNDA:1,anonymous_46
|
||||
FNDA:1,anonymous_47
|
||||
FNDA:1,anonymous_48
|
||||
FNDA:0,anonymous_49
|
||||
FNDA:0,anonymous_50
|
||||
FNDA:1,anonymous_49
|
||||
FNDA:1,anonymous_50
|
||||
FNDA:1,anonymous_51
|
||||
FNDA:1,functionOnly
|
||||
FNDA:1,anonymous_52
|
||||
FNDA:1,anonymous_53
|
||||
FNDA:0,functionAndOptions
|
||||
FNDA:1,anonymous_55
|
||||
FNDA:1,anonymous_56
|
||||
FNDA:1,anonymous_54
|
||||
FNDA:0,anonymous_55
|
||||
FNDA:0,anonymous_56
|
||||
FNDA:1,anonymous_57
|
||||
FNDA:1,anonymous_58
|
||||
FNDA:1,functionOnly
|
||||
FNDA:1,anonymous_59
|
||||
FNDA:1,anonymous_60
|
||||
FNDA:0,functionAndOptions
|
||||
FNDA:1,anonymous_61
|
||||
FNDA:1,anonymous_62
|
||||
FNDA:1,anonymous_63
|
||||
@@ -174,141 +180,152 @@ FNDA:1,anonymous_69
|
||||
FNDA:1,anonymous_70
|
||||
FNDA:1,anonymous_71
|
||||
FNDA:1,anonymous_72
|
||||
FNDA:1,obj
|
||||
FNDA:1,anonymous_73
|
||||
FNDA:1,anonymous_74
|
||||
FNDA:1,obj
|
||||
FNDA:1,anonymous_75
|
||||
FNDA:1,anonymous_76
|
||||
FNDA:1,anonymous_77
|
||||
FNDA:1,anonymous_78
|
||||
FNDA:1,anonymous_79
|
||||
FNDA:1,obj
|
||||
FNDA:1,anonymous_80
|
||||
FNDA:1,anonymous_81
|
||||
FNDA:1,obj
|
||||
FNDA:1,anonymous_82
|
||||
FNDA:1,anonymous_83
|
||||
FNDA:1,anonymous_84
|
||||
FNDA:1,anonymous_85
|
||||
FNDA:1,anonymous_86
|
||||
FNDA:1,anonymous_87
|
||||
FNDA:1,get then
|
||||
FNDA:1,anonymous_88
|
||||
FNDA:1,anonymous_89
|
||||
FNDA:1,anonymous_90
|
||||
FNDA:1,get then
|
||||
FNDA:1,anonymous_91
|
||||
FNDA:1,anonymous_92
|
||||
FNDA:1,anonymous_93
|
||||
FNDA:1,anonymous_94
|
||||
FNDA:1,get then
|
||||
FNDA:1,anonymous_95
|
||||
FNDA:1,anonymous_96
|
||||
FNDA:1,anonymous_97
|
||||
FNDA:1,get then
|
||||
FNDA:1,anonymous_98
|
||||
FNDA:1,anonymous_99
|
||||
FNDA:1,anonymous_100
|
||||
FNF:101
|
||||
FNH:98
|
||||
FNDA:1,anonymous_101
|
||||
FNDA:1,anonymous_102
|
||||
FNDA:1,anonymous_103
|
||||
FNDA:1,anonymous_104
|
||||
FNDA:1,anonymous_105
|
||||
FNDA:1,anonymous_106
|
||||
FNF:107
|
||||
FNH:103
|
||||
BRDA:1,0,0,1
|
||||
BRDA:8,1,0,1
|
||||
BRDA:12,2,0,1
|
||||
BRDA:16,3,0,1
|
||||
BRDA:21,4,0,1
|
||||
BRDA:26,5,0,1
|
||||
BRDA:30,6,0,1
|
||||
BRDA:34,7,0,1
|
||||
BRDA:38,8,0,1
|
||||
BRDA:42,9,0,1
|
||||
BRDA:46,10,0,1
|
||||
BRDA:50,11,0,1
|
||||
BRDA:54,12,0,1
|
||||
BRDA:59,13,0,1
|
||||
BRDA:64,14,0,1
|
||||
BRDA:68,15,0,1
|
||||
BRDA:72,16,0,1
|
||||
BRDA:76,17,0,1
|
||||
BRDA:80,18,0,1
|
||||
BRDA:81,19,0,1
|
||||
BRDA:86,20,0,1
|
||||
BRDA:87,21,0,1
|
||||
BRDA:92,22,0,1
|
||||
BRDA:93,23,0,1
|
||||
BRDA:94,24,0,1
|
||||
BRDA:100,25,0,1
|
||||
BRDA:101,26,0,1
|
||||
BRDA:107,27,0,1
|
||||
BRDA:111,28,0,1
|
||||
BRDA:112,29,0,1
|
||||
BRDA:113,30,0,1
|
||||
BRDA:114,31,0,1
|
||||
BRDA:122,32,0,1
|
||||
BRDA:123,33,0,1
|
||||
BRDA:130,34,0,1
|
||||
BRDA:131,35,0,1
|
||||
BRDA:132,36,0,1
|
||||
BRDA:140,37,0,1
|
||||
BRDA:141,38,0,1
|
||||
BRDA:142,39,0,1
|
||||
BRDA:150,40,0,1
|
||||
BRDA:151,41,0,1
|
||||
BRDA:159,42,0,1
|
||||
BRDA:160,43,0,1
|
||||
BRDA:161,44,0,1
|
||||
BRDA:166,45,0,1
|
||||
BRDA:167,46,0,1
|
||||
BRDA:171,47,0,1
|
||||
BRDA:172,48,0,1
|
||||
BRDA:173,49,0,1
|
||||
BRDA:187,50,0,1
|
||||
BRDA:195,51,0,1
|
||||
BRDA:198,52,0,1
|
||||
BRDA:215,53,0,1
|
||||
BRDA:219,54,0,1
|
||||
BRDA:220,55,0,1
|
||||
BRDA:225,56,0,1
|
||||
BRDA:229,57,0,1
|
||||
BRDA:233,58,0,1
|
||||
BRDA:238,59,0,1
|
||||
BRDA:242,60,0,1
|
||||
BRDA:246,61,0,1
|
||||
BRDA:251,62,0,1
|
||||
BRDA:256,63,0,1
|
||||
BRDA:257,64,0,1
|
||||
BRDA:263,65,0,1
|
||||
BRDA:264,66,0,1
|
||||
BRDA:269,67,0,1
|
||||
BRDA:270,68,0,1
|
||||
BRDA:277,69,0,1
|
||||
BRDA:20,4,0,1
|
||||
BRDA:24,5,0,1
|
||||
BRDA:32,6,0,1
|
||||
BRDA:36,7,0,1
|
||||
BRDA:40,8,0,1
|
||||
BRDA:45,9,0,1
|
||||
BRDA:50,10,0,1
|
||||
BRDA:54,11,0,1
|
||||
BRDA:58,12,0,1
|
||||
BRDA:62,13,0,1
|
||||
BRDA:66,14,0,1
|
||||
BRDA:70,15,0,1
|
||||
BRDA:74,16,0,1
|
||||
BRDA:78,17,0,1
|
||||
BRDA:83,18,0,1
|
||||
BRDA:88,19,0,1
|
||||
BRDA:92,20,0,1
|
||||
BRDA:96,21,0,1
|
||||
BRDA:100,22,0,1
|
||||
BRDA:104,23,0,1
|
||||
BRDA:105,24,0,1
|
||||
BRDA:110,25,0,1
|
||||
BRDA:111,26,0,1
|
||||
BRDA:116,27,0,1
|
||||
BRDA:117,28,0,1
|
||||
BRDA:118,29,0,1
|
||||
BRDA:124,30,0,1
|
||||
BRDA:125,31,0,1
|
||||
BRDA:131,32,0,1
|
||||
BRDA:135,33,0,1
|
||||
BRDA:136,34,0,1
|
||||
BRDA:137,35,0,1
|
||||
BRDA:138,36,0,1
|
||||
BRDA:146,37,0,1
|
||||
BRDA:147,38,0,1
|
||||
BRDA:154,39,0,1
|
||||
BRDA:155,40,0,1
|
||||
BRDA:156,41,0,1
|
||||
BRDA:164,42,0,1
|
||||
BRDA:165,43,0,1
|
||||
BRDA:166,44,0,1
|
||||
BRDA:174,45,0,1
|
||||
BRDA:175,46,0,1
|
||||
BRDA:183,47,0,1
|
||||
BRDA:184,48,0,1
|
||||
BRDA:185,49,0,1
|
||||
BRDA:190,50,0,1
|
||||
BRDA:191,51,0,1
|
||||
BRDA:195,52,0,1
|
||||
BRDA:196,53,0,1
|
||||
BRDA:197,54,0,1
|
||||
BRDA:211,55,0,1
|
||||
BRDA:219,56,0,1
|
||||
BRDA:222,57,0,1
|
||||
BRDA:239,58,0,1
|
||||
BRDA:243,59,0,1
|
||||
BRDA:244,60,0,1
|
||||
BRDA:249,61,0,1
|
||||
BRDA:253,62,0,1
|
||||
BRDA:257,63,0,1
|
||||
BRDA:262,64,0,1
|
||||
BRDA:266,65,0,1
|
||||
BRDA:270,66,0,1
|
||||
BRDA:275,67,0,1
|
||||
BRDA:280,68,0,1
|
||||
BRDA:281,69,0,1
|
||||
BRDA:287,70,0,1
|
||||
BRDA:289,71,0,1
|
||||
BRDA:298,72,0,1
|
||||
BRDA:300,73,0,1
|
||||
BRDA:309,74,0,1
|
||||
BRDA:310,75,0,1
|
||||
BRDA:288,71,0,1
|
||||
BRDA:293,72,0,1
|
||||
BRDA:294,73,0,1
|
||||
BRDA:301,74,0,1
|
||||
BRDA:311,75,0,1
|
||||
BRDA:313,76,0,1
|
||||
BRDA:318,77,0,1
|
||||
BRDA:319,78,0,1
|
||||
BRDA:320,79,0,1
|
||||
BRDA:327,80,0,1
|
||||
BRDA:328,81,0,1
|
||||
BRDA:335,82,0,1
|
||||
BRDA:336,83,0,1
|
||||
BRDA:341,84,0,1
|
||||
BRDA:345,85,0,1
|
||||
BRDA:348,86,0,1
|
||||
BRDA:349,87,0,0
|
||||
BRDA:351,88,0,1
|
||||
BRDA:356,89,0,1
|
||||
BRDA:359,90,0,1
|
||||
BRDA:360,91,0,0
|
||||
BRDA:362,92,0,1
|
||||
BRDA:367,93,0,1
|
||||
BRDA:370,94,0,0
|
||||
BRDA:368,95,0,1
|
||||
BRDA:369,96,0,1
|
||||
BRDA:373,97,0,1
|
||||
BRDA:376,98,0,0
|
||||
BRDA:374,99,0,1
|
||||
BRDA:375,100,0,1
|
||||
BRDA:381,101,0,1
|
||||
BRDA:385,102,0,1
|
||||
BRF:103
|
||||
BRH:99
|
||||
BRDA:322,77,0,1
|
||||
BRDA:324,78,0,1
|
||||
BRDA:333,79,0,1
|
||||
BRDA:334,80,0,1
|
||||
BRDA:337,81,0,1
|
||||
BRDA:342,82,0,1
|
||||
BRDA:343,83,0,1
|
||||
BRDA:344,84,0,1
|
||||
BRDA:351,85,0,1
|
||||
BRDA:352,86,0,1
|
||||
BRDA:359,87,0,1
|
||||
BRDA:360,88,0,1
|
||||
BRDA:365,89,0,1
|
||||
BRDA:369,90,0,1
|
||||
BRDA:372,91,0,1
|
||||
BRDA:373,92,0,0
|
||||
BRDA:375,93,0,1
|
||||
BRDA:380,94,0,1
|
||||
BRDA:383,95,0,1
|
||||
BRDA:384,96,0,0
|
||||
BRDA:386,97,0,1
|
||||
BRDA:391,98,0,1
|
||||
BRDA:394,99,0,0
|
||||
BRDA:392,100,0,1
|
||||
BRDA:393,101,0,1
|
||||
BRDA:397,102,0,1
|
||||
BRDA:400,103,0,0
|
||||
BRDA:398,104,0,1
|
||||
BRDA:399,105,0,1
|
||||
BRDA:405,106,0,1
|
||||
BRDA:409,107,0,1
|
||||
BRF:108
|
||||
BRH:104
|
||||
DA:1,1
|
||||
DA:2,1
|
||||
DA:3,1
|
||||
@@ -337,7 +354,7 @@ DA:25,1
|
||||
DA:26,1
|
||||
DA:27,1
|
||||
DA:28,1
|
||||
DA:29,1
|
||||
DA:29,0
|
||||
DA:30,1
|
||||
DA:31,1
|
||||
DA:32,1
|
||||
@@ -488,11 +505,11 @@ DA:176,1
|
||||
DA:177,1
|
||||
DA:178,1
|
||||
DA:179,1
|
||||
DA:180,0
|
||||
DA:180,1
|
||||
DA:181,1
|
||||
DA:182,1
|
||||
DA:183,1
|
||||
DA:184,0
|
||||
DA:184,1
|
||||
DA:185,1
|
||||
DA:186,1
|
||||
DA:187,1
|
||||
@@ -512,11 +529,11 @@ DA:200,1
|
||||
DA:201,1
|
||||
DA:202,1
|
||||
DA:203,1
|
||||
DA:204,1
|
||||
DA:204,0
|
||||
DA:205,1
|
||||
DA:206,1
|
||||
DA:207,1
|
||||
DA:208,1
|
||||
DA:208,0
|
||||
DA:209,1
|
||||
DA:210,1
|
||||
DA:211,1
|
||||
@@ -715,6 +732,30 @@ DA:403,1
|
||||
DA:404,1
|
||||
DA:405,1
|
||||
DA:406,1
|
||||
LH:404
|
||||
LF:406
|
||||
DA:407,1
|
||||
DA:408,1
|
||||
DA:409,1
|
||||
DA:410,1
|
||||
DA:411,1
|
||||
DA:412,1
|
||||
DA:413,1
|
||||
DA:414,1
|
||||
DA:415,1
|
||||
DA:416,1
|
||||
DA:417,1
|
||||
DA:418,1
|
||||
DA:419,1
|
||||
DA:420,1
|
||||
DA:421,1
|
||||
DA:422,1
|
||||
DA:423,1
|
||||
DA:424,1
|
||||
DA:425,1
|
||||
DA:426,1
|
||||
DA:427,1
|
||||
DA:428,1
|
||||
DA:429,1
|
||||
DA:430,1
|
||||
LH:427
|
||||
LF:430
|
||||
end_of_record
|
||||
+24
@@ -5,6 +5,30 @@ const assert = require('node:assert');
|
||||
const test = require('node:test');
|
||||
const util = require('util');
|
||||
|
||||
test.expectFailure('sync expect fail (method)', () => {
|
||||
throw new Error('should pass');
|
||||
});
|
||||
|
||||
test('sync expect fail (options)', { expectFailure: true }, () => {
|
||||
throw new Error('should pass');
|
||||
});
|
||||
|
||||
test.expectFailure('async expect fail (method)', async () => {
|
||||
throw new Error('should pass');
|
||||
});
|
||||
|
||||
test('async expect fail (options)', { expectFailure: true }, async () => {
|
||||
throw new Error('should pass');
|
||||
});
|
||||
|
||||
test.todo('sync todo with expect fail', { expectFailure: true }, () => {
|
||||
throw new Error('should not count as an expected failure');
|
||||
});
|
||||
|
||||
test.skip('sync skip expect fail', { expectFailure: true }, () => {
|
||||
throw new Error('should not fail');
|
||||
});
|
||||
|
||||
test('sync pass todo', (t) => {
|
||||
t.todo();
|
||||
});
|
||||
|
||||
+103
-67
@@ -1,18 +1,54 @@
|
||||
TAP version 13
|
||||
# Subtest: sync expect fail (method)
|
||||
ok 1 - sync expect fail (method) # EXPECTED FAILURE
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: sync expect fail (options)
|
||||
ok 2 - sync expect fail (options) # EXPECTED FAILURE
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: async expect fail (method)
|
||||
ok 3 - async expect fail (method) # EXPECTED FAILURE
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: async expect fail (options)
|
||||
ok 4 - async expect fail (options) # EXPECTED FAILURE
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: sync todo with expect fail
|
||||
ok 5 - sync todo with expect fail # TODO
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: sync skip expect fail
|
||||
ok 6 - sync skip expect fail # SKIP
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: sync pass todo
|
||||
ok 1 - sync pass todo # TODO
|
||||
ok 7 - sync pass todo # TODO
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: sync pass todo with message
|
||||
ok 2 - sync pass todo with message # TODO this is a passing todo
|
||||
ok 8 - sync pass todo with message # TODO this is a passing todo
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: sync fail todo
|
||||
not ok 3 - sync fail todo # TODO
|
||||
not ok 9 - sync fail todo # TODO
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -30,7 +66,7 @@ not ok 3 - sync fail todo # TODO
|
||||
*
|
||||
...
|
||||
# Subtest: sync fail todo with message
|
||||
not ok 4 - sync fail todo with message # TODO this is a failing todo
|
||||
not ok 10 - sync fail todo with message # TODO this is a failing todo
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -48,26 +84,26 @@ not ok 4 - sync fail todo with message # TODO this is a failing todo
|
||||
*
|
||||
...
|
||||
# Subtest: sync skip pass
|
||||
ok 5 - sync skip pass # SKIP
|
||||
ok 11 - sync skip pass # SKIP
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: sync skip pass with message
|
||||
ok 6 - sync skip pass with message # SKIP this is skipped
|
||||
ok 12 - sync skip pass with message # SKIP this is skipped
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: sync pass
|
||||
ok 7 - sync pass
|
||||
ok 13 - sync pass
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# this test should pass
|
||||
# Subtest: sync throw fail
|
||||
not ok 8 - sync throw fail
|
||||
not ok 14 - sync throw fail
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -85,19 +121,19 @@ not ok 8 - sync throw fail
|
||||
*
|
||||
...
|
||||
# Subtest: async skip pass
|
||||
ok 9 - async skip pass # SKIP
|
||||
ok 15 - async skip pass # SKIP
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: async pass
|
||||
ok 10 - async pass
|
||||
ok 16 - async pass
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: async throw fail
|
||||
not ok 11 - async throw fail
|
||||
not ok 17 - async throw fail
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -115,7 +151,7 @@ not ok 11 - async throw fail
|
||||
*
|
||||
...
|
||||
# Subtest: async skip fail
|
||||
not ok 12 - async skip fail # SKIP
|
||||
not ok 18 - async skip fail # SKIP
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -133,7 +169,7 @@ not ok 12 - async skip fail # SKIP
|
||||
*
|
||||
...
|
||||
# Subtest: async assertion fail
|
||||
not ok 13 - async assertion fail
|
||||
not ok 19 - async assertion fail
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -159,13 +195,13 @@ not ok 13 - async assertion fail
|
||||
*
|
||||
...
|
||||
# Subtest: resolve pass
|
||||
ok 14 - resolve pass
|
||||
ok 20 - resolve pass
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: reject fail
|
||||
not ok 15 - reject fail
|
||||
not ok 21 - reject fail
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -183,31 +219,31 @@ not ok 15 - reject fail
|
||||
*
|
||||
...
|
||||
# Subtest: unhandled rejection - passes but warns
|
||||
ok 16 - unhandled rejection - passes but warns
|
||||
ok 22 - unhandled rejection - passes but warns
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: async unhandled rejection - passes but warns
|
||||
ok 17 - async unhandled rejection - passes but warns
|
||||
ok 23 - async unhandled rejection - passes but warns
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: immediate throw - passes but warns
|
||||
ok 18 - immediate throw - passes but warns
|
||||
ok 24 - immediate throw - passes but warns
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: immediate reject - passes but warns
|
||||
ok 19 - immediate reject - passes but warns
|
||||
ok 25 - immediate reject - passes but warns
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: immediate resolve pass
|
||||
ok 20 - immediate resolve pass
|
||||
ok 26 - immediate resolve pass
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -236,7 +272,7 @@ ok 20 - immediate resolve pass
|
||||
...
|
||||
# this subtest should make its parent test fail
|
||||
1..1
|
||||
not ok 21 - subtest sync throw fail
|
||||
not ok 27 - subtest sync throw fail
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -246,7 +282,7 @@ not ok 21 - subtest sync throw fail
|
||||
code: 'ERR_TEST_FAILURE'
|
||||
...
|
||||
# Subtest: sync throw non-error fail
|
||||
not ok 22 - sync throw non-error fail
|
||||
not ok 28 - sync throw non-error fail
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -281,7 +317,7 @@ not ok 22 - sync throw non-error fail
|
||||
type: 'test'
|
||||
...
|
||||
1..4
|
||||
ok 23 - level 0a
|
||||
ok 29 - level 0a
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -307,31 +343,31 @@ ok 23 - level 0a
|
||||
type: 'test'
|
||||
...
|
||||
1..2
|
||||
ok 24 - top level
|
||||
ok 30 - top level
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: invalid subtest - pass but subtest fails
|
||||
ok 25 - invalid subtest - pass but subtest fails
|
||||
ok 31 - invalid subtest - pass but subtest fails
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: sync skip option
|
||||
ok 26 - sync skip option # SKIP
|
||||
ok 32 - sync skip option # SKIP
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: sync skip option with message
|
||||
ok 27 - sync skip option with message # SKIP this is skipped
|
||||
ok 33 - sync skip option with message # SKIP this is skipped
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: sync skip option is false fail
|
||||
not ok 28 - sync skip option is false fail
|
||||
not ok 34 - sync skip option is false fail
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -349,61 +385,61 @@ not ok 28 - sync skip option is false fail
|
||||
*
|
||||
...
|
||||
# Subtest: <anonymous>
|
||||
ok 29 - <anonymous>
|
||||
ok 35 - <anonymous>
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: functionOnly
|
||||
ok 30 - functionOnly
|
||||
ok 36 - functionOnly
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: <anonymous>
|
||||
ok 31 - <anonymous>
|
||||
ok 37 - <anonymous>
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: test with only a name provided
|
||||
ok 32 - test with only a name provided
|
||||
ok 38 - test with only a name provided
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: <anonymous>
|
||||
ok 33 - <anonymous>
|
||||
ok 39 - <anonymous>
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: <anonymous>
|
||||
ok 34 - <anonymous> # SKIP
|
||||
ok 40 - <anonymous> # SKIP
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: test with a name and options provided
|
||||
ok 35 - test with a name and options provided # SKIP
|
||||
ok 41 - test with a name and options provided # SKIP
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: functionAndOptions
|
||||
ok 36 - functionAndOptions # SKIP
|
||||
ok 42 - functionAndOptions # SKIP
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: callback pass
|
||||
ok 37 - callback pass
|
||||
ok 43 - callback pass
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: callback fail
|
||||
not ok 38 - callback fail
|
||||
not ok 44 - callback fail
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -416,25 +452,25 @@ not ok 38 - callback fail
|
||||
*
|
||||
...
|
||||
# Subtest: sync t is this in test
|
||||
ok 39 - sync t is this in test
|
||||
ok 45 - sync t is this in test
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: async t is this in test
|
||||
ok 40 - async t is this in test
|
||||
ok 46 - async t is this in test
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: callback t is this in test
|
||||
ok 41 - callback t is this in test
|
||||
ok 47 - callback t is this in test
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: callback also returns a Promise
|
||||
not ok 42 - callback also returns a Promise
|
||||
not ok 48 - callback also returns a Promise
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -444,7 +480,7 @@ not ok 42 - callback also returns a Promise
|
||||
code: 'ERR_TEST_FAILURE'
|
||||
...
|
||||
# Subtest: callback throw
|
||||
not ok 43 - callback throw
|
||||
not ok 49 - callback throw
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -462,7 +498,7 @@ not ok 43 - callback throw
|
||||
*
|
||||
...
|
||||
# Subtest: callback called twice
|
||||
not ok 44 - callback called twice
|
||||
not ok 50 - callback called twice
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -475,13 +511,13 @@ not ok 44 - callback called twice
|
||||
*
|
||||
...
|
||||
# Subtest: callback called twice in different ticks
|
||||
ok 45 - callback called twice in different ticks
|
||||
ok 51 - callback called twice in different ticks
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: callback called twice in future tick
|
||||
not ok 46 - callback called twice in future tick
|
||||
not ok 52 - callback called twice in future tick
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -493,7 +529,7 @@ not ok 46 - callback called twice in future tick
|
||||
*
|
||||
...
|
||||
# Subtest: callback async throw
|
||||
not ok 47 - callback async throw
|
||||
not ok 53 - callback async throw
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -506,7 +542,7 @@ not ok 47 - callback async throw
|
||||
*
|
||||
...
|
||||
# Subtest: callback async throw after done
|
||||
ok 48 - callback async throw after done
|
||||
ok 54 - callback async throw after done
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -531,13 +567,13 @@ ok 48 - callback async throw after done
|
||||
type: 'test'
|
||||
...
|
||||
1..3
|
||||
ok 49 - only is set on subtests but not in only mode
|
||||
ok 55 - only is set on subtests but not in only mode
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: custom inspect symbol fail
|
||||
not ok 50 - custom inspect symbol fail
|
||||
not ok 56 - custom inspect symbol fail
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -547,7 +583,7 @@ not ok 50 - custom inspect symbol fail
|
||||
code: 'ERR_TEST_FAILURE'
|
||||
...
|
||||
# Subtest: custom inspect symbol that throws fail
|
||||
not ok 51 - custom inspect symbol that throws fail
|
||||
not ok 57 - custom inspect symbol that throws fail
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -602,7 +638,7 @@ not ok 51 - custom inspect symbol that throws fail
|
||||
*
|
||||
...
|
||||
1..2
|
||||
not ok 52 - subtest sync throw fails
|
||||
not ok 58 - subtest sync throw fails
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -612,7 +648,7 @@ not ok 52 - subtest sync throw fails
|
||||
code: 'ERR_TEST_FAILURE'
|
||||
...
|
||||
# Subtest: timed out async test
|
||||
not ok 53 - timed out async test
|
||||
not ok 59 - timed out async test
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -622,7 +658,7 @@ not ok 53 - timed out async test
|
||||
code: 'ERR_TEST_FAILURE'
|
||||
...
|
||||
# Subtest: timed out callback test
|
||||
not ok 54 - timed out callback test
|
||||
not ok 60 - timed out callback test
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -632,25 +668,25 @@ not ok 54 - timed out callback test
|
||||
code: 'ERR_TEST_FAILURE'
|
||||
...
|
||||
# Subtest: large timeout async test is ok
|
||||
ok 55 - large timeout async test is ok
|
||||
ok 61 - large timeout async test is ok
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: large timeout callback test is ok
|
||||
ok 56 - large timeout callback test is ok
|
||||
ok 62 - large timeout callback test is ok
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: successful thenable
|
||||
ok 57 - successful thenable
|
||||
ok 63 - successful thenable
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: rejected thenable
|
||||
not ok 58 - rejected thenable
|
||||
not ok 64 - rejected thenable
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -660,7 +696,7 @@ not ok 58 - rejected thenable
|
||||
code: 'ERR_TEST_FAILURE'
|
||||
...
|
||||
# Subtest: unfinished test with uncaughtException
|
||||
not ok 59 - unfinished test with uncaughtException
|
||||
not ok 65 - unfinished test with uncaughtException
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -674,7 +710,7 @@ not ok 59 - unfinished test with uncaughtException
|
||||
*
|
||||
...
|
||||
# Subtest: unfinished test with unhandledRejection
|
||||
not ok 60 - unfinished test with unhandledRejection
|
||||
not ok 66 - unfinished test with unhandledRejection
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -688,7 +724,7 @@ not ok 60 - unfinished test with unhandledRejection
|
||||
*
|
||||
...
|
||||
# Subtest: assertion errors display actual and expected properly
|
||||
not ok 61 - assertion errors display actual and expected properly
|
||||
not ok 67 - assertion errors display actual and expected properly
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -758,7 +794,7 @@ not ok 61 - assertion errors display actual and expected properly
|
||||
*
|
||||
...
|
||||
# Subtest: invalid subtest fail
|
||||
not ok 62 - invalid subtest fail
|
||||
not ok 68 - invalid subtest fail
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -769,7 +805,7 @@ not ok 62 - invalid subtest fail
|
||||
stack: |-
|
||||
*
|
||||
...
|
||||
1..62
|
||||
1..68
|
||||
# Error: Test "unhandled rejection - passes but warns" at test/fixtures/test-runner/output/output.js:(LINE):1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event.
|
||||
# Error: Test "async unhandled rejection - passes but warns" at test/fixtures/test-runner/output/output.js:(LINE):1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from async unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event.
|
||||
# Error: A resource generated asynchronous activity after the test ended. This activity created the error "Error: uncaught from outside of a test" which triggered an uncaughtException event, caught by the test runner.
|
||||
@@ -777,11 +813,11 @@ not ok 62 - invalid subtest fail
|
||||
# Error: Test "immediate reject - passes but warns" at test/fixtures/test-runner/output/output.js:(LINE):1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from immediate reject fail" and would have caused the test to fail, but instead triggered an unhandledRejection event.
|
||||
# Error: Test "callback called twice in different ticks" at test/fixtures/test-runner/output/output.js:(LINE):1 generated asynchronous activity after the test ended. This activity created the error "Error [ERR_TEST_FAILURE]: callback invoked multiple times" and would have caused the test to fail, but instead triggered an uncaughtException event.
|
||||
# Error: Test "callback async throw after done" at test/fixtures/test-runner/output/output.js:(LINE):1 generated asynchronous activity after the test ended. This activity created the error "Error: thrown from callback async throw after done" and would have caused the test to fail, but instead triggered an uncaughtException event.
|
||||
# tests 75
|
||||
# tests 81
|
||||
# suites 0
|
||||
# pass 36
|
||||
# pass 40
|
||||
# fail 24
|
||||
# cancelled 2
|
||||
# skipped 9
|
||||
# todo 4
|
||||
# skipped 10
|
||||
# todo 5
|
||||
# duration_ms *
|
||||
+11
-7
@@ -3,10 +3,14 @@ require('../../../common');
|
||||
const fixtures = require('../../../common/fixtures');
|
||||
const spawn = require('node:child_process').spawn;
|
||||
|
||||
spawn(process.execPath,
|
||||
[
|
||||
'--no-warnings', '--test', '--test-reporter', 'tap',
|
||||
fixtures.path('test-runner/output/output.js'),
|
||||
fixtures.path('test-runner/output/single.js'),
|
||||
],
|
||||
{ stdio: 'inherit' });
|
||||
spawn(
|
||||
process.execPath,
|
||||
[
|
||||
'--no-warnings',
|
||||
'--test-reporter', 'tap',
|
||||
'--test',
|
||||
fixtures.path('test-runner/output/output.js'),
|
||||
fixtures.path('test-runner/output/single.js'),
|
||||
],
|
||||
{ stdio: 'inherit' },
|
||||
);
|
||||
+104
-68
@@ -1,18 +1,54 @@
|
||||
TAP version 13
|
||||
# Subtest: sync expect fail (method)
|
||||
ok 1 - sync expect fail (method) # EXPECTED FAILURE
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: sync expect fail (options)
|
||||
ok 2 - sync expect fail (options) # EXPECTED FAILURE
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: async expect fail (method)
|
||||
ok 3 - async expect fail (method) # EXPECTED FAILURE
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: async expect fail (options)
|
||||
ok 4 - async expect fail (options) # EXPECTED FAILURE
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: sync todo with expect fail
|
||||
ok 5 - sync todo with expect fail # TODO
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: sync skip expect fail
|
||||
ok 6 - sync skip expect fail # SKIP
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: sync pass todo
|
||||
ok 1 - sync pass todo # TODO
|
||||
ok 7 - sync pass todo # TODO
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: sync pass todo with message
|
||||
ok 2 - sync pass todo with message # TODO this is a passing todo
|
||||
ok 8 - sync pass todo with message # TODO this is a passing todo
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: sync fail todo
|
||||
not ok 3 - sync fail todo # TODO
|
||||
not ok 9 - sync fail todo # TODO
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -30,7 +66,7 @@ not ok 3 - sync fail todo # TODO
|
||||
*
|
||||
...
|
||||
# Subtest: sync fail todo with message
|
||||
not ok 4 - sync fail todo with message # TODO this is a failing todo
|
||||
not ok 10 - sync fail todo with message # TODO this is a failing todo
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -48,26 +84,26 @@ not ok 4 - sync fail todo with message # TODO this is a failing todo
|
||||
*
|
||||
...
|
||||
# Subtest: sync skip pass
|
||||
ok 5 - sync skip pass # SKIP
|
||||
ok 11 - sync skip pass # SKIP
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: sync skip pass with message
|
||||
ok 6 - sync skip pass with message # SKIP this is skipped
|
||||
ok 12 - sync skip pass with message # SKIP this is skipped
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: sync pass
|
||||
ok 7 - sync pass
|
||||
ok 13 - sync pass
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# this test should pass
|
||||
# Subtest: sync throw fail
|
||||
not ok 8 - sync throw fail
|
||||
not ok 14 - sync throw fail
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -85,19 +121,19 @@ not ok 8 - sync throw fail
|
||||
*
|
||||
...
|
||||
# Subtest: async skip pass
|
||||
ok 9 - async skip pass # SKIP
|
||||
ok 15 - async skip pass # SKIP
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: async pass
|
||||
ok 10 - async pass
|
||||
ok 16 - async pass
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: async throw fail
|
||||
not ok 11 - async throw fail
|
||||
not ok 17 - async throw fail
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -115,7 +151,7 @@ not ok 11 - async throw fail
|
||||
*
|
||||
...
|
||||
# Subtest: async skip fail
|
||||
not ok 12 - async skip fail # SKIP
|
||||
not ok 18 - async skip fail # SKIP
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -133,7 +169,7 @@ not ok 12 - async skip fail # SKIP
|
||||
*
|
||||
...
|
||||
# Subtest: async assertion fail
|
||||
not ok 13 - async assertion fail
|
||||
not ok 19 - async assertion fail
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -159,13 +195,13 @@ not ok 13 - async assertion fail
|
||||
*
|
||||
...
|
||||
# Subtest: resolve pass
|
||||
ok 14 - resolve pass
|
||||
ok 20 - resolve pass
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: reject fail
|
||||
not ok 15 - reject fail
|
||||
not ok 21 - reject fail
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -183,31 +219,31 @@ not ok 15 - reject fail
|
||||
*
|
||||
...
|
||||
# Subtest: unhandled rejection - passes but warns
|
||||
ok 16 - unhandled rejection - passes but warns
|
||||
ok 22 - unhandled rejection - passes but warns
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: async unhandled rejection - passes but warns
|
||||
ok 17 - async unhandled rejection - passes but warns
|
||||
ok 23 - async unhandled rejection - passes but warns
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: immediate throw - passes but warns
|
||||
ok 18 - immediate throw - passes but warns
|
||||
ok 24 - immediate throw - passes but warns
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: immediate reject - passes but warns
|
||||
ok 19 - immediate reject - passes but warns
|
||||
ok 25 - immediate reject - passes but warns
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: immediate resolve pass
|
||||
ok 20 - immediate resolve pass
|
||||
ok 26 - immediate resolve pass
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -236,7 +272,7 @@ ok 20 - immediate resolve pass
|
||||
...
|
||||
# this subtest should make its parent test fail
|
||||
1..1
|
||||
not ok 21 - subtest sync throw fail
|
||||
not ok 27 - subtest sync throw fail
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -246,7 +282,7 @@ not ok 21 - subtest sync throw fail
|
||||
code: 'ERR_TEST_FAILURE'
|
||||
...
|
||||
# Subtest: sync throw non-error fail
|
||||
not ok 22 - sync throw non-error fail
|
||||
not ok 28 - sync throw non-error fail
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -281,7 +317,7 @@ not ok 22 - sync throw non-error fail
|
||||
type: 'test'
|
||||
...
|
||||
1..4
|
||||
ok 23 - level 0a
|
||||
ok 29 - level 0a
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -307,31 +343,31 @@ ok 23 - level 0a
|
||||
type: 'test'
|
||||
...
|
||||
1..2
|
||||
ok 24 - top level
|
||||
ok 30 - top level
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: invalid subtest - pass but subtest fails
|
||||
ok 25 - invalid subtest - pass but subtest fails
|
||||
ok 31 - invalid subtest - pass but subtest fails
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: sync skip option
|
||||
ok 26 - sync skip option # SKIP
|
||||
ok 32 - sync skip option # SKIP
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: sync skip option with message
|
||||
ok 27 - sync skip option with message # SKIP this is skipped
|
||||
ok 33 - sync skip option with message # SKIP this is skipped
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: sync skip option is false fail
|
||||
not ok 28 - sync skip option is false fail
|
||||
not ok 34 - sync skip option is false fail
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -349,61 +385,61 @@ not ok 28 - sync skip option is false fail
|
||||
*
|
||||
...
|
||||
# Subtest: <anonymous>
|
||||
ok 29 - <anonymous>
|
||||
ok 35 - <anonymous>
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: functionOnly
|
||||
ok 30 - functionOnly
|
||||
ok 36 - functionOnly
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: <anonymous>
|
||||
ok 31 - <anonymous>
|
||||
ok 37 - <anonymous>
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: test with only a name provided
|
||||
ok 32 - test with only a name provided
|
||||
ok 38 - test with only a name provided
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: <anonymous>
|
||||
ok 33 - <anonymous>
|
||||
ok 39 - <anonymous>
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: <anonymous>
|
||||
ok 34 - <anonymous> # SKIP
|
||||
ok 40 - <anonymous> # SKIP
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: test with a name and options provided
|
||||
ok 35 - test with a name and options provided # SKIP
|
||||
ok 41 - test with a name and options provided # SKIP
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: functionAndOptions
|
||||
ok 36 - functionAndOptions # SKIP
|
||||
ok 42 - functionAndOptions # SKIP
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: callback pass
|
||||
ok 37 - callback pass
|
||||
ok 43 - callback pass
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: callback fail
|
||||
not ok 38 - callback fail
|
||||
not ok 44 - callback fail
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -416,25 +452,25 @@ not ok 38 - callback fail
|
||||
*
|
||||
...
|
||||
# Subtest: sync t is this in test
|
||||
ok 39 - sync t is this in test
|
||||
ok 45 - sync t is this in test
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: async t is this in test
|
||||
ok 40 - async t is this in test
|
||||
ok 46 - async t is this in test
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: callback t is this in test
|
||||
ok 41 - callback t is this in test
|
||||
ok 47 - callback t is this in test
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: callback also returns a Promise
|
||||
not ok 42 - callback also returns a Promise
|
||||
not ok 48 - callback also returns a Promise
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -444,7 +480,7 @@ not ok 42 - callback also returns a Promise
|
||||
code: 'ERR_TEST_FAILURE'
|
||||
...
|
||||
# Subtest: callback throw
|
||||
not ok 43 - callback throw
|
||||
not ok 49 - callback throw
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -462,7 +498,7 @@ not ok 43 - callback throw
|
||||
*
|
||||
...
|
||||
# Subtest: callback called twice
|
||||
not ok 44 - callback called twice
|
||||
not ok 50 - callback called twice
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -475,13 +511,13 @@ not ok 44 - callback called twice
|
||||
*
|
||||
...
|
||||
# Subtest: callback called twice in different ticks
|
||||
ok 45 - callback called twice in different ticks
|
||||
ok 51 - callback called twice in different ticks
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: callback called twice in future tick
|
||||
not ok 46 - callback called twice in future tick
|
||||
not ok 52 - callback called twice in future tick
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -493,7 +529,7 @@ not ok 46 - callback called twice in future tick
|
||||
*
|
||||
...
|
||||
# Subtest: callback async throw
|
||||
not ok 47 - callback async throw
|
||||
not ok 53 - callback async throw
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -506,7 +542,7 @@ not ok 47 - callback async throw
|
||||
*
|
||||
...
|
||||
# Subtest: callback async throw after done
|
||||
ok 48 - callback async throw after done
|
||||
ok 54 - callback async throw after done
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -539,13 +575,13 @@ ok 48 - callback async throw after done
|
||||
type: 'test'
|
||||
...
|
||||
1..4
|
||||
ok 49 - only is set on subtests but not in only mode
|
||||
ok 55 - only is set on subtests but not in only mode
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: custom inspect symbol fail
|
||||
not ok 50 - custom inspect symbol fail
|
||||
not ok 56 - custom inspect symbol fail
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -555,7 +591,7 @@ not ok 50 - custom inspect symbol fail
|
||||
code: 'ERR_TEST_FAILURE'
|
||||
...
|
||||
# Subtest: custom inspect symbol that throws fail
|
||||
not ok 51 - custom inspect symbol that throws fail
|
||||
not ok 57 - custom inspect symbol that throws fail
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -610,7 +646,7 @@ not ok 51 - custom inspect symbol that throws fail
|
||||
*
|
||||
...
|
||||
1..2
|
||||
not ok 52 - subtest sync throw fails
|
||||
not ok 58 - subtest sync throw fails
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -620,7 +656,7 @@ not ok 52 - subtest sync throw fails
|
||||
code: 'ERR_TEST_FAILURE'
|
||||
...
|
||||
# Subtest: timed out async test
|
||||
not ok 53 - timed out async test
|
||||
not ok 59 - timed out async test
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -630,7 +666,7 @@ not ok 53 - timed out async test
|
||||
code: 'ERR_TEST_FAILURE'
|
||||
...
|
||||
# Subtest: timed out callback test
|
||||
not ok 54 - timed out callback test
|
||||
not ok 60 - timed out callback test
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -640,25 +676,25 @@ not ok 54 - timed out callback test
|
||||
code: 'ERR_TEST_FAILURE'
|
||||
...
|
||||
# Subtest: large timeout async test is ok
|
||||
ok 55 - large timeout async test is ok
|
||||
ok 61 - large timeout async test is ok
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: large timeout callback test is ok
|
||||
ok 56 - large timeout callback test is ok
|
||||
ok 62 - large timeout callback test is ok
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: successful thenable
|
||||
ok 57 - successful thenable
|
||||
ok 63 - successful thenable
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: rejected thenable
|
||||
not ok 58 - rejected thenable
|
||||
not ok 64 - rejected thenable
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -668,7 +704,7 @@ not ok 58 - rejected thenable
|
||||
code: 'ERR_TEST_FAILURE'
|
||||
...
|
||||
# Subtest: unfinished test with uncaughtException
|
||||
not ok 59 - unfinished test with uncaughtException
|
||||
not ok 65 - unfinished test with uncaughtException
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -682,7 +718,7 @@ not ok 59 - unfinished test with uncaughtException
|
||||
*
|
||||
...
|
||||
# Subtest: unfinished test with unhandledRejection
|
||||
not ok 60 - unfinished test with unhandledRejection
|
||||
not ok 66 - unfinished test with unhandledRejection
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -696,7 +732,7 @@ not ok 60 - unfinished test with unhandledRejection
|
||||
*
|
||||
...
|
||||
# Subtest: assertion errors display actual and expected properly
|
||||
not ok 61 - assertion errors display actual and expected properly
|
||||
not ok 67 - assertion errors display actual and expected properly
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -766,7 +802,7 @@ not ok 61 - assertion errors display actual and expected properly
|
||||
*
|
||||
...
|
||||
# Subtest: invalid subtest fail
|
||||
not ok 62 - invalid subtest fail
|
||||
not ok 68 - invalid subtest fail
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
@@ -785,17 +821,17 @@ not ok 62 - invalid subtest fail
|
||||
# Error: Test "callback called twice in different ticks" at test/fixtures/test-runner/output/output.js:(LINE):1 generated asynchronous activity after the test ended. This activity created the error "Error [ERR_TEST_FAILURE]: callback invoked multiple times" and would have caused the test to fail, but instead triggered an uncaughtException event.
|
||||
# Error: Test "callback async throw after done" at test/fixtures/test-runner/output/output.js:(LINE):1 generated asynchronous activity after the test ended. This activity created the error "Error: thrown from callback async throw after done" and would have caused the test to fail, but instead triggered an uncaughtException event.
|
||||
# Subtest: last test
|
||||
ok 63 - last test
|
||||
ok 69 - last test
|
||||
---
|
||||
duration_ms: *
|
||||
type: 'test'
|
||||
...
|
||||
1..63
|
||||
# tests 77
|
||||
1..69
|
||||
# tests 83
|
||||
# suites 0
|
||||
# pass 38
|
||||
# pass 42
|
||||
# fail 24
|
||||
# cancelled 2
|
||||
# skipped 9
|
||||
# todo 4
|
||||
# skipped 10
|
||||
# todo 5
|
||||
# duration_ms *
|
||||
+10
-3
@@ -3,9 +3,16 @@ require('../../../common');
|
||||
const fixtures = require('../../../common/fixtures');
|
||||
const spawn = require('node:child_process').spawn;
|
||||
|
||||
const child = spawn(process.execPath,
|
||||
['--no-warnings', '--test-reporter', 'spec', fixtures.path('test-runner/output/output.js')],
|
||||
{ stdio: 'pipe' });
|
||||
const child = spawn(
|
||||
process.execPath,
|
||||
[
|
||||
'--no-warnings',
|
||||
'--test-reporter', 'spec',
|
||||
fixtures.path('test-runner/output/output.js'),
|
||||
],
|
||||
{ stdio: 'pipe' },
|
||||
);
|
||||
|
||||
// eslint-disable-next-line no-control-regex
|
||||
child.stdout.on('data', (d) => process.stdout.write(d.toString().replace(/[^\x00-\x7F]/g, '').replace(/\u001b\[\d+m/g, '')));
|
||||
child.stderr.pipe(process.stderr);
|
||||
+16
-10
@@ -1,3 +1,9 @@
|
||||
sync expect fail (method) (*ms) # EXPECTED FAILURE
|
||||
sync expect fail (options) (*ms) # EXPECTED FAILURE
|
||||
async expect fail (method) (*ms) # EXPECTED FAILURE
|
||||
async expect fail (options) (*ms) # EXPECTED FAILURE
|
||||
sync todo with expect fail (*ms) # TODO
|
||||
sync skip expect fail (*ms) # SKIP
|
||||
sync pass todo (*ms) # TODO
|
||||
sync pass todo with message (*ms) # this is a passing todo
|
||||
sync fail todo (*ms) # TODO
|
||||
@@ -81,20 +87,20 @@
|
||||
unfinished test with unhandledRejection (*ms)
|
||||
assertion errors display actual and expected properly (*ms)
|
||||
invalid subtest fail (*ms)
|
||||
Error: Test "unhandled rejection - passes but warns" at test/fixtures/test-runner/output/output.js:72:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event.
|
||||
Error: Test "async unhandled rejection - passes but warns" at test/fixtures/test-runner/output/output.js:76:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from async unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event.
|
||||
Error: Test "unhandled rejection - passes but warns" at test/fixtures/test-runner/output/output.js:96:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event.
|
||||
Error: Test "async unhandled rejection - passes but warns" at test/fixtures/test-runner/output/output.js:100:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from async unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event.
|
||||
Error: A resource generated asynchronous activity after the test ended. This activity created the error "Error: uncaught from outside of a test" which triggered an uncaughtException event, caught by the test runner.
|
||||
Error: Test "immediate throw - passes but warns" at test/fixtures/test-runner/output/output.js:80:1 generated asynchronous activity after the test ended. This activity created the error "Error: thrown from immediate throw fail" and would have caused the test to fail, but instead triggered an uncaughtException event.
|
||||
Error: Test "immediate reject - passes but warns" at test/fixtures/test-runner/output/output.js:86:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from immediate reject fail" and would have caused the test to fail, but instead triggered an unhandledRejection event.
|
||||
Error: Test "callback called twice in different ticks" at test/fixtures/test-runner/output/output.js:251:1 generated asynchronous activity after the test ended. This activity created the error "Error [ERR_TEST_FAILURE]: callback invoked multiple times" and would have caused the test to fail, but instead triggered an uncaughtException event.
|
||||
Error: Test "callback async throw after done" at test/fixtures/test-runner/output/output.js:269:1 generated asynchronous activity after the test ended. This activity created the error "Error: thrown from callback async throw after done" and would have caused the test to fail, but instead triggered an uncaughtException event.
|
||||
tests 75
|
||||
Error: Test "immediate throw - passes but warns" at test/fixtures/test-runner/output/output.js:104:1 generated asynchronous activity after the test ended. This activity created the error "Error: thrown from immediate throw fail" and would have caused the test to fail, but instead triggered an uncaughtException event.
|
||||
Error: Test "immediate reject - passes but warns" at test/fixtures/test-runner/output/output.js:110:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from immediate reject fail" and would have caused the test to fail, but instead triggered an unhandledRejection event.
|
||||
Error: Test "callback called twice in different ticks" at test/fixtures/test-runner/output/output.js:275:1 generated asynchronous activity after the test ended. This activity created the error "Error [ERR_TEST_FAILURE]: callback invoked multiple times" and would have caused the test to fail, but instead triggered an uncaughtException event.
|
||||
Error: Test "callback async throw after done" at test/fixtures/test-runner/output/output.js:293:1 generated asynchronous activity after the test ended. This activity created the error "Error: thrown from callback async throw after done" and would have caused the test to fail, but instead triggered an uncaughtException event.
|
||||
tests 81
|
||||
suites 0
|
||||
pass 36
|
||||
pass 40
|
||||
fail 24
|
||||
cancelled 2
|
||||
skipped 9
|
||||
todo 4
|
||||
skipped 10
|
||||
todo 5
|
||||
duration_ms *
|
||||
|
||||
failing tests:
|
||||
|
||||
+11
-6
@@ -3,12 +3,17 @@ require('../../../common');
|
||||
const fixtures = require('../../../common/fixtures');
|
||||
const spawn = require('node:child_process').spawn;
|
||||
|
||||
const child = spawn(process.execPath,
|
||||
[
|
||||
'--no-warnings', '--test', '--test-reporter', 'spec',
|
||||
fixtures.path('test-runner/output/output.js'),
|
||||
],
|
||||
{ stdio: 'pipe' });
|
||||
const child = spawn(
|
||||
process.execPath,
|
||||
[
|
||||
'--no-warnings',
|
||||
'--test-reporter', 'spec',
|
||||
'--test',
|
||||
fixtures.path('test-runner/output/output.js'),
|
||||
],
|
||||
{ stdio: 'pipe' },
|
||||
);
|
||||
|
||||
// eslint-disable-next-line no-control-regex
|
||||
child.stdout.on('data', (d) => process.stdout.write(d.toString().replace(/[^\x00-\x7F]/g, '').replace(/\u001b\[\d+m/g, '')));
|
||||
child.stderr.pipe(process.stderr);
|
||||
+16
-10
@@ -1,3 +1,9 @@
|
||||
sync expect fail (method) (*ms) # EXPECTED FAILURE
|
||||
sync expect fail (options) (*ms) # EXPECTED FAILURE
|
||||
async expect fail (method) (*ms) # EXPECTED FAILURE
|
||||
async expect fail (options) (*ms) # EXPECTED FAILURE
|
||||
sync todo with expect fail (*ms) # TODO
|
||||
sync skip expect fail (*ms) # SKIP
|
||||
sync pass todo (*ms) # TODO
|
||||
sync pass todo with message (*ms) # this is a passing todo
|
||||
sync fail todo (*ms) # TODO
|
||||
@@ -84,20 +90,20 @@
|
||||
unfinished test with unhandledRejection (*ms)
|
||||
assertion errors display actual and expected properly (*ms)
|
||||
invalid subtest fail (*ms)
|
||||
Error: Test "unhandled rejection - passes but warns" at test/fixtures/test-runner/output/output.js:72:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event.
|
||||
Error: Test "async unhandled rejection - passes but warns" at test/fixtures/test-runner/output/output.js:76:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from async unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event.
|
||||
Error: Test "unhandled rejection - passes but warns" at test/fixtures/test-runner/output/output.js:96:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event.
|
||||
Error: Test "async unhandled rejection - passes but warns" at test/fixtures/test-runner/output/output.js:100:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from async unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event.
|
||||
Error: A resource generated asynchronous activity after the test ended. This activity created the error "Error: uncaught from outside of a test" which triggered an uncaughtException event, caught by the test runner.
|
||||
Error: Test "immediate throw - passes but warns" at test/fixtures/test-runner/output/output.js:80:1 generated asynchronous activity after the test ended. This activity created the error "Error: thrown from immediate throw fail" and would have caused the test to fail, but instead triggered an uncaughtException event.
|
||||
Error: Test "immediate reject - passes but warns" at test/fixtures/test-runner/output/output.js:86:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from immediate reject fail" and would have caused the test to fail, but instead triggered an unhandledRejection event.
|
||||
Error: Test "callback called twice in different ticks" at test/fixtures/test-runner/output/output.js:251:1 generated asynchronous activity after the test ended. This activity created the error "Error [ERR_TEST_FAILURE]: callback invoked multiple times" and would have caused the test to fail, but instead triggered an uncaughtException event.
|
||||
Error: Test "callback async throw after done" at test/fixtures/test-runner/output/output.js:269:1 generated asynchronous activity after the test ended. This activity created the error "Error: thrown from callback async throw after done" and would have caused the test to fail, but instead triggered an uncaughtException event.
|
||||
tests 76
|
||||
Error: Test "immediate throw - passes but warns" at test/fixtures/test-runner/output/output.js:104:1 generated asynchronous activity after the test ended. This activity created the error "Error: thrown from immediate throw fail" and would have caused the test to fail, but instead triggered an uncaughtException event.
|
||||
Error: Test "immediate reject - passes but warns" at test/fixtures/test-runner/output/output.js:110:1 generated asynchronous activity after the test ended. This activity created the error "Error: rejected from immediate reject fail" and would have caused the test to fail, but instead triggered an unhandledRejection event.
|
||||
Error: Test "callback called twice in different ticks" at test/fixtures/test-runner/output/output.js:275:1 generated asynchronous activity after the test ended. This activity created the error "Error [ERR_TEST_FAILURE]: callback invoked multiple times" and would have caused the test to fail, but instead triggered an uncaughtException event.
|
||||
Error: Test "callback async throw after done" at test/fixtures/test-runner/output/output.js:293:1 generated asynchronous activity after the test ended. This activity created the error "Error: thrown from callback async throw after done" and would have caused the test to fail, but instead triggered an uncaughtException event.
|
||||
tests 82
|
||||
suites 0
|
||||
pass 37
|
||||
pass 41
|
||||
fail 24
|
||||
cancelled 2
|
||||
skipped 9
|
||||
todo 4
|
||||
skipped 10
|
||||
todo 5
|
||||
duration_ms *
|
||||
|
||||
failing tests:
|
||||
|
||||
Reference in new issue
Block a user