From 3dbcbbc44e4ca91c7abbdcf9ae64055376298b23 Mon Sep 17 00:00:00 2001 From: Dom Webber Date: Tue, 2 Jul 2024 09:28:45 +0100 Subject: [PATCH] Use String.raw in jest.config.ts --- jest.config.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jest.config.ts b/jest.config.ts index 15fe0f34..7930f18f 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -20,12 +20,12 @@ const config: Config = { moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"], roots: ["/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", }, };