mirror of https://github.com/nodejs/node.git
assert: refactor internal assert.js
Move lib/internal/assert.js to lib/internal/assert/assertion_error.js. This is in preparation for making lib/internal/assert.js a tiny module for use in Node.js built-ins so that we can use `assert()` without having to load the entire ~1200 line `assert` module. PR-URL: https://github.com/nodejs/node/pull/25956 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Minwoo Jung <minwoo@nodesource.com>pull/26008/head
parent
7182aca108
commit
64745c3ade
|
@ -27,7 +27,7 @@ const { codes: {
|
|||
ERR_INVALID_ARG_VALUE,
|
||||
ERR_INVALID_RETURN_VALUE
|
||||
} } = require('internal/errors');
|
||||
const { AssertionError } = require('internal/assert');
|
||||
const AssertionError = require('internal/assert/assertion_error');
|
||||
const { openSync, closeSync, readSync } = require('fs');
|
||||
const { inspect, types: { isPromise, isRegExp } } = require('util');
|
||||
const { EOL } = require('internal/constants');
|
||||
|
|
|
@ -405,6 +405,4 @@ class AssertionError extends Error {
|
|||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
AssertionError
|
||||
};
|
||||
module.exports = AssertionError;
|
Loading…
Reference in New Issue