Skip to content

Commit 999b76e

Browse files
authored
test: migrate error test form phython to js
1 parent 5204001 commit 999b76e

5 files changed

Lines changed: 11 additions & 8 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

2222
'use strict';
23-
require('../common');
23+
require('../../common');
2424

2525
process.nextTick(function() {
2626
process.nextTick(function() {
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
2-
*test*message*nexttick_throw.js:*
1+
*nexttick_throw.js:*
32
undefined_reference_error_maker;
43
^
4+
55
ReferenceError: undefined_reference_error_maker is not defined
6-
at *test*message*nexttick_throw.js:*:*
7-
at process.processTicksAndRejections (node:internal/process/task_queues:*:*)
6+
at *nexttick_throw.js:*:*
7+
at process.processTicksAndRejections (node:internal*process*task_queues:*:*)
88

99
Node.js *

test/message/node_run_non_existent.js renamed to test/fixtures/errors/node_run_non_existent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
'use strict';
22

3-
require('../common');
3+
require('../../common');
44
const assert = require('node:assert').strict;
55
const childProcess = require('node:child_process');
6-
const fixtures = require('../common/fixtures');
6+
const fixtures = require('../../common/fixtures');
77

88
const child = childProcess.spawnSync(
99
process.execPath,

test/message/node_run_non_existent.out renamed to test/fixtures/errors/node_run_non_existent.snapshot

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Missing script: "non-existent-command" for *
1+
Missing script: "non-existent-command" for *fixtures*run-script*package.json
22

33
Available scripts are:
44
test: echo "Error: no test specified" && exit 1
@@ -14,3 +14,4 @@ Available scripts are:
1414
special-env-variables-windows: special-env-variables.bat
1515
pwd: pwd
1616
pwd-windows: cd
17+

test/parallel/test-node-output-errors.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ describe('errors output', { concurrency: !process.env.TEST_PARALLEL }, () => {
6161
{ name: 'errors/events_unhandled_error_sameline.js', transform: errTransform },
6262
{ name: 'errors/events_unhandled_error_subclass.js', transform: errTransform },
6363
{ name: 'errors/if-error-has-good-stack.js', transform: errTransform },
64+
{ name: 'errors/nexttick_throw.js', transform: errTransform },
65+
{ name: 'errors/node_run_non_existent.js', transform: errTransform },
6466
{ name: 'errors/throw_custom_error.js', transform: errTransform },
6567
{ name: 'errors/throw_error_with_getter_throw.js', transform: errTransform },
6668
{ name: 'errors/throw_in_eval_anonymous.js', transform: errTransform },

0 commit comments

Comments
 (0)