Skip to content

Commit af5890e

Browse files
Removed old test code for Node < 9
1 parent 40266fd commit af5890e

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

test/specs/serialization.spec.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,7 @@ const { expect } = require("chai");
44
const { onoes, comparePOJO, host } = require("../utils");
55

66
// 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-
})();
7+
const inspect = Symbol.for("nodejs.util.inspect.custom");
178

189
for (let { name, ono, errorTypeName } of onoes) {
1910
describe(`${name} serialization`, () => {

0 commit comments

Comments
 (0)