Skip to content

Commit cd0c6a7

Browse files
committed
test: migrate snapshot from python to js
1 parent a2de5b9 commit cd0c6a7

22 files changed

+47
-194
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
require('../common');
3+
require('../../common');
44
const assert = require('assert').strict;
55

66
assert.throws(() => { throw new Error('foo'); }, { bar: true });

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
99
- Comparison {
1010
- bar: true
1111
- }
12-
at Object.<anonymous> (*assert_throws_stack.js:*:*)
12+
13+
at *
1314
at *
1415
at *
1516
at *
@@ -21,10 +22,10 @@ AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
2122
generatedMessage: true,
2223
code: 'ERR_ASSERTION',
2324
actual: Error: foo
24-
at assert.throws.bar (*assert_throws_stack.js:*)
25-
at getActual (node:assert:*)
26-
at Function.throws (node:assert:*)
27-
at Object.<anonymous> (*assert_throws_stack.js:*:*)
25+
at *
26+
at *
27+
at *
28+
at *
2829
at *
2930
at *
3031
at *
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict';
22

3-
require('../common');
3+
require('../../common');
44

55
console.assert(false, Symbol('hello'));
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Assertion failed Symbol(hello)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

33
// Flags: --expose-internals
4-
require('../common');
4+
require('../../common');
55

66
const assert = require('internal/assert');
77
assert(false);

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
node:internal/assert:*
1+
node:internal*assert:*
22
throw new ERR_INTERNAL_ASSERTION(message);
33
^
44

55
Error [ERR_INTERNAL_ASSERTION]: This is caused by either a bug in Node.js or incorrect usage of Node.js internals.
6-
Please open an issue with this stack trace at https://github.com/nodejs/node/issues
6+
Please open an issue with this stack trace at https:*github.com*nodejs*node*issues
77

8-
at assert (node:internal/assert:*:*)
9-
at * (*test*message*internal_assert.js:7:1)
8+
at *
9+
at *
1010
at *
1111
at *
1212
at *
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

33
// Flags: --expose-internals
4-
require('../common');
4+
require('../../common');
55

66
const assert = require('internal/assert');
77
assert.fail('Unreachable!');

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
node:internal/assert:*
1+
node:internal*assert:*
22
throw new ERR_INTERNAL_ASSERTION(message);
33
^
44

55
Error [ERR_INTERNAL_ASSERTION]: Unreachable!
66
This is caused by either a bug in Node.js or incorrect usage of Node.js internals.
7-
Please open an issue with this stack trace at https://github.com/nodejs/node/issues
7+
Please open an issue with this stack trace at https:*github.com*nodejs*node*issues
88

9-
at Function.fail (node:internal/assert:*:*)
10-
at * (*test*message*internal_assert_fail.js:7:8)
9+
at *
10+
at *
1111
at *
1212
at *
1313
at *

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

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.maxTickDepth = 10;
2626
let i = 20;

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

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/message/util_inspect_error.js renamed to test/fixtures/errors/util_inspect_error.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
require('../common');
3+
require('../../common');
44
const util = require('util');
55

66
const err = new Error('foo\nbar');

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{ err:
22
Error: foo
33
bar
4-
at *util_inspect_error*
54
at *
65
at *
76
at *
@@ -10,11 +9,11 @@
109
at *
1110
at *
1211
at *
12+
at node:internal*main*run_main_module:*:*,
1313
nested:
1414
{ err:
1515
Error: foo
1616
bar
17-
at *util_inspect_error*
1817
at *
1918
at *
2019
at *
@@ -23,10 +22,10 @@
2322
at *
2423
at *
2524
at *
25+
at node:internal*main*run_main_module:*:* } }
2626
{
2727
err: Error: foo
2828
bar
29-
at *util_inspect_error*
3029
at *
3130
at *
3231
at *
@@ -35,10 +34,11 @@
3534
at *
3635
at *
3736
at *
37+
at node:internal*main*run_main_module:*:*,
3838
nested: {
3939
err: Error: foo
4040
bar
41-
at *util_inspect_error*
41+
at *
4242
at *
4343
at *
4444
at *
@@ -51,7 +51,7 @@
5151
}
5252
{ Error: foo
5353
bar
54-
at *util_inspect_error*
54+
at *
5555
at *
5656
at *
5757
at *

test/message/util-inspect-error-cause.js renamed to test/fixtures/errors/util_inspect_error_cause.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
require('../common');
3+
require('../../common');
44

55
const { inspect } = require('util');
66

test/message/util-inspect-error-cause.out renamed to test/fixtures/errors/util_inspect_error_cause.snapshot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Error: Object cause
2424
message: 'Unique',
2525
name: 'Error',
2626
stack: 'Error: Unique\n' +
27-
' at Module._compile (node:internal/modules/cjs/loader:827:30)'
27+
' at Module._compile (node:internal*modules*cjs*loader:*:*)'
2828
}
2929
}
3030
Error: undefined cause
@@ -156,7 +156,7 @@ Error: Stack causes
156156
at *
157157
at *
158158
... 6 lines matching cause stack trace ...
159-
at *
159+
at * {
160160
status: 'Feeling good',
161161
extraProperties: 'Yes!',
162162
[cause]: TypeError: Inner error

test/message/console_assert.out

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/message/message.status

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)