Skip to content

Commit e7b03d8

Browse files
Trottsagitsofan
authored andcommitted
assert: remove internal errorCache property
The internal assert module exposed an errorCache property solely for testing. It is no longer necessary. Remove it. PR-URL: nodejs#23304 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
1 parent 141cd23 commit e7b03d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/parallel/test-assert-builtins-not-read-from-filesystem.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ if (process.argv[2] !== 'child') {
1919
e.emit('hello', false);
2020
} catch (err) {
2121
const frames = err.stack.split('\n');
22-
const [, filename, , ] = frames[1].match(/\((.+):(\d+):(\d+)\)/);
22+
const [, filename, line, column] = frames[1].match(/\((.+):(\d+):(\d+)\)/);
2323
// Spawn a child process to avoid the error having been cached in the assert
2424
// module's `errorCache` Map.
2525

2626
const { output, status, error } =
2727
spawnSync(process.execPath,
28-
[process.argv[1], 'child', filename],
28+
[process.argv[1], 'child', filename, line, column],
2929
{ cwd: tmpdir.path, env: process.env });
3030
assert.ifError(error);
3131
assert.strictEqual(status, 0, `Exit code: ${status}\n${output}`);

0 commit comments

Comments
 (0)