deno.land / x / drash@v3.0.0-beta.2 / jest.config.node.ts
123456789101112131415161718192021222324252627282930313233343536373839/** @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";}
Version Info