-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add test dir ESLint & update Jest config for improved testing s…
…tructure
- Loading branch information
Showing
3 changed files
with
23 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
import type { JestConfigWithTsJest } from "ts-jest"; | ||
|
||
const config: JestConfigWithTsJest = { | ||
testEnvironment: "node", | ||
roots: ["<rootDir>/src"], | ||
testRegex: ".*\\.spec\\.ts$", | ||
testPathIgnorePatterns: ["/node_modules/", "/bin/"], | ||
collectCoverageFrom: ["src/**/*.ts", "!**/*.spec.ts", "src/**/index.ts"], | ||
moduleNameMapper: { | ||
"^@src/(.*)$": "<rootDir>/src/$1", | ||
}, | ||
setupFiles: ["reflect-metadata"], | ||
transform: { | ||
"^.+\\.ts$": [ | ||
"ts-jest", | ||
{ | ||
tsconfig: "tsconfig.json", | ||
// Add any ts-jest specific options here | ||
}, | ||
], | ||
}, | ||
testEnvironment: "node", | ||
roots: ["<rootDir>/src", "<rootDir>/test"], | ||
testRegex: ".*\\.spec\\.ts$", | ||
testPathIgnorePatterns: ["/node_modules/", "/bin/"], | ||
collectCoverageFrom: ["src/**/*.ts", "!**/*.spec.ts", "src/**/index.ts"], | ||
moduleNameMapper: { | ||
"^@src/(.*)$": "<rootDir>/src/$1", | ||
}, | ||
setupFiles: ["reflect-metadata"], | ||
transform: { | ||
"^.+\\.ts$": [ | ||
"ts-jest", | ||
{ | ||
tsconfig: "tsconfig.json", | ||
// Add any ts-jest specific options here | ||
}, | ||
], | ||
}, | ||
}; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
it("pass", () => { | ||
expect(true).toBe(true); | ||
describe("Test", () => { | ||
it("pass", () => { | ||
expect(true).toBe(true); | ||
}); | ||
}); |