convert job queue and job queue helper
This commit is contained in:
1 parent
5a7b51bfec
commit
cf67c82f5e
5 files changed
+149
-26
No files matched your search
+10
-1
@@ -1,5 +1,14 @@
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
import { pathsToModuleNameMapper } from "ts-jest";
|
||||
import type { Config } from "jest";
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
const tsconfigPath = path.resolve(__dirname, "./tsconfig.json");
|
||||
const tsconfig = JSON.parse(fs.readFileSync(tsconfigPath, "utf-8"));
|
||||
|
||||
const config: Config = {
|
||||
rootDir: ".",
|
||||
testEnvironment: "node",
|
||||
@@ -8,7 +17,7 @@ const config: Config = {
|
||||
"^.+\\.(t|j)sx?$": ["ts-jest", { useESM: true, tsconfig: "./tsconfig.jest.json" }],
|
||||
},
|
||||
moduleNameMapper: {
|
||||
"^@/(.*)$": "<rootDir>/src/$1",
|
||||
...pathsToModuleNameMapper(tsconfig.compilerOptions.paths || {}, { prefix: "<rootDir>/" }),
|
||||
},
|
||||
testMatch: ["<rootDir>/test/**/*.test.ts"],
|
||||
setupFilesAfterEnv: [],
|
||||
|
||||
Reference in new issue
Block a user