Skip to content

Commit 280500d

Browse files
committed
add napiVersion and skipTest harness globals and remove unused imports
1 parent 48f1a69 commit 280500d

3 files changed

Lines changed: 8 additions & 13 deletions

File tree

eslint.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ export default defineConfig([
1717
mustNotCall: "readonly",
1818
gcUntil: "readonly",
1919
experimentalFeatures: "readonly",
20+
napiVersion: "readonly",
21+
skipTest: "readonly",
2022
},
2123
},
2224
rules: {

implementors/node/features.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,9 @@ globalThis.experimentalFeatures = {
77
setPrototype: true,
88
postFinalizer: true,
99
};
10+
11+
globalThis.napiVersion = Number(process.versions.napi);
12+
13+
globalThis.skipTest = () => {
14+
process.exit(0);
15+
};

implementors/node/run-tests.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,6 @@ import { listDirectoryEntries, runFileInSubprocess } from "./tests.ts";
66
const ROOT_PATH = path.resolve(import.meta.dirname, "..", "..");
77
const TESTS_ROOT_PATH = path.join(ROOT_PATH, "tests");
88

9-
const ASSERT_MODULE_PATH = path.join(
10-
ROOT_PATH,
11-
"implementors",
12-
"node",
13-
"assert.js"
14-
);
15-
const LOAD_ADDON_MODULE_PATH = path.join(
16-
ROOT_PATH,
17-
"implementors",
18-
"node",
19-
"load-addon.js"
20-
);
21-
229
async function populateSuite(
2310
testContext: TestContext,
2411
dir: string

0 commit comments

Comments
 (0)