Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

// Flags: --expose-internals
require('../common');
require('../../common');

const assert = require('internal/assert');
assert.fail('Unreachable!');
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
node:internal/assert:*
node:internal/assert:<line>
throw new ERR_INTERNAL_ASSERTION(message);
^

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

at assert.fail (node:internal/assert:*:*)
at * (*test*message*internal_assert_fail.js:7:8)
at *
at *
at *
at *
at *
at *
at * {
at <node-internal-frames>
at Object.<anonymous> (<project-root>/test/fixtures/errors/internal_assert_fail.js:7:8)
at <node-internal-frames>
at <node-internal-frames> {
code: 'ERR_INTERNAL_ASSERTION'
}

Node.js *
Node.js <node-version>
1 change: 1 addition & 0 deletions test/parallel/test-node-output-errors.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ describe('errors output', { concurrency: !process.env.TEST_PARALLEL }, () => {
{ name: 'errors/events_unhandled_error_sameline.js' },
{ name: 'errors/events_unhandled_error_subclass.js' },
{ name: 'errors/if-error-has-good-stack.js' },
{ name: 'errors/internal_assert_fail.js' },
{ name: 'errors/throw_custom_error.js' },
{ name: 'errors/throw_error_with_getter_throw.js' },
{ name: 'errors/throw_in_eval_anonymous.js' },
Expand Down
Loading