Skip to content

Commit 2b45348

Browse files
committed
refactor(tests): streamline multi-process test scripts by utilizing external script templates
1 parent 6b2d664 commit 2b45348

File tree

4 files changed

+589
-473
lines changed

4 files changed

+589
-473
lines changed

jest.config.api-compat.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// @ts-check
22

3+
34
/** @type {import('ts-jest').JestConfigWithTsJest} */
45
const config = {
56
displayName: `API Compatibility Test`,
67
testEnvironment: "jest-environment-node",
7-
testTimeout: 10000,
88
roots: ["<rootDir>/src"],
99
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
1010
verbose: true,

jest.config.cjs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// @ts-check
22

33
const { argv } = require("node:process");
4-
const { getTestTimeout } = require("./test/test-timeout-config.cjs");
54

65
const isESM =
76
process.env.TEST_ESM === "1" ||
@@ -11,8 +10,6 @@ const isESM =
1110
const config = {
1211
displayName: `@photostructure/sqlite (${isESM ? "ESM" : "CJS"})`,
1312
testEnvironment: "jest-environment-node",
14-
// Use environment-aware timeout configuration
15-
testTimeout: getTestTimeout(),
1613
roots: ["<rootDir>/src", "<rootDir>/test"],
1714
coverageProvider: "v8",
1815
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
@@ -43,7 +40,7 @@ const config = {
4340
coverageThreshold: {
4441
global: {
4542
statements: 70,
46-
branches: 30, // Lowered due to dirname/stack_path environment-specific branches
43+
branches: 30, // Lowered due to dirname/stack_path environment-specific branches
4744
functions: 20, // Lowered due to dirname/stack_path helper functions
4845
lines: 70,
4946
},
@@ -68,4 +65,4 @@ const config = {
6865
testPathIgnorePatterns: ["/node_modules/", "api-compatibility\\.test\\.ts"],
6966
};
7067

71-
module.exports = config;
68+
module.exports = config;

0 commit comments

Comments
 (0)