0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/parallel/test-internal-assert.js
Joyee Cheung b9f1e57201
lib: throw a special error in internal/assert
Instead of using the public AssertionError, use a simplified
error that describes potential causes of these assertions
and suggests the user to open an issue.

PR-URL: https://github.com/nodejs/node/pull/26635
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-04-25 01:29:48 +02:00

14 lines
307 B
JavaScript

// Flags: --expose-internals
'use strict';
// This tests that the internal assert module works as expected.
// The failures are tested in test/message.
require('../common');
const internalAssert = require('internal/assert');
// Should not throw.
internalAssert(true);
internalAssert(true, 'fhqwhgads');