deno.land / x / drash@v3.0.0-beta.2 / jest.config.node.ts

jest.config.node.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */import type { Config } from "@jest/types";
const testDirectory = getTestDirectory();
console.log(`\nRunning tests in node/${testDirectory} directory\n`);
const config: Config.InitialOptions = { testMatch: [ `**/node/${testDirectory}/**/(*.)+(test).+(ts|tsx)`, ], transform: { "^.+\\.(ts|tsx)?$": [ "ts-jest", { tsconfig: "./tests/compat/node/tsconfig.json", }, ], "^.+\\.(js|jsx)$": "babel-jest", },};
export default config;
function getTestDirectory() { console.log(`\nNode version: ${process.version}\n`);
const matchedVersion = process.version.match(/v[0-9]+/);
if (!matchedVersion) { console.log( `\nFailed to get test directory. \`process.version\` match returned ${matchedVersion}.\n`, ); process.exit(1); }
return "node-" + matchedVersion[0] + ".x";}
drash

Version Info

Tagged at
4 months ago