Add configuration, documentation, code of conduct, contributing guide, license, and README files. Set up .gitignore, coverage config, GitHub issue templates, pull request template, and initial source code, scripts, and tests for DeepLX optimized for Cloudflare Workers.
28 lines
742 B
JavaScript
28 lines
742 B
JavaScript
module.exports = {
|
|
preset: "ts-jest",
|
|
testEnvironment: "node",
|
|
roots: ["<rootDir>/src", "<rootDir>/tests"],
|
|
testMatch: ["**/__tests__/**/*.ts", "**/?(*.)+(spec|test).ts"],
|
|
transform: {
|
|
"^.+\\.ts$": "ts-jest",
|
|
},
|
|
collectCoverageFrom: ["src/**/*.ts", "!src/**/*.d.ts", "!src/**/index.ts"],
|
|
coverageDirectory: "coverage",
|
|
coverageReporters: ["text", "lcov", "html"],
|
|
setupFilesAfterEnv: ["<rootDir>/tests/setup.ts"],
|
|
moduleNameMapping: {
|
|
"^@/(.*)$": "<rootDir>/src/$1",
|
|
},
|
|
testTimeout: 30000,
|
|
globals: {
|
|
"ts-jest": {
|
|
tsconfig: {
|
|
target: "ES2020",
|
|
module: "commonjs",
|
|
lib: ["ES2020", "WebWorker"],
|
|
types: ["@cloudflare/workers-types", "jest"],
|
|
},
|
|
},
|
|
},
|
|
};
|