Skip to content

Commit

Permalink
Use String.raw in jest.config.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
domwebber committed Jul 2, 2024
1 parent f912f1c commit 3dbcbbc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ const config: Config = {
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
roots: ["<rootDir>/src"],
testEnvironment: "node",
testRegex: "./src/.*\\.(test|spec)?\\.(ts|ts)$",
testRegex: String.raw`./src/.*\.(test|spec)?\.(ts|ts)$`,
moduleNameMapper: {
"^(\\.{1,2}/.*)\\.js$": "$1",
[String.raw`^(\.{1,2}/.*)\.js$`]: "$1",
},
transform: {
"^.+\\.(t|j)sx?$": "ts-jest",
[String.raw`^.+\.(t|j)sx?$`]: "ts-jest",
},
};

Expand Down

0 comments on commit 3dbcbbc

Please sign in to comment.