We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 40266fd commit af5890eCopy full SHA for af5890e
test/specs/serialization.spec.js
@@ -4,16 +4,7 @@ const { expect } = require("chai");
4
const { onoes, comparePOJO, host } = require("../utils");
5
6
// https://nodejs.org/api/util.html#util_util_inspect_custom
7
-const inspect = (() => {
8
- if (host.node.version >= 10.12) {
9
- // The well-known symbol was added in Node v10.12
10
- return Symbol.for("nodejs.util.inspect.custom");
11
- }
12
- else if (host.node) {
13
- // Older versions of Node only exposed the symbal via util.inspect.custom
14
- return require("util").inspect.custom;
15
16
-})();
+const inspect = Symbol.for("nodejs.util.inspect.custom");
17
18
for (let { name, ono, errorTypeName } of onoes) {
19
describe(`${name} serialization`, () => {
0 commit comments