From ea6c0437276c4c8a75cda493630f3f6a81703044 Mon Sep 17 00:00:00 2001 From: Marcarrian Date: Tue, 25 Jul 2023 16:50:41 +0200 Subject: [PATCH] chore: enable TypeScript strict mode in end-to-end tests --- package.json | 4 ++-- .../scion/components.e2e/playwright.config.ts | 2 +- projects/scion/components.e2e/tsconfig.json | 19 ++++++++++++------- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index db0bee8d..deeeda9a 100644 --- a/package.json +++ b/package.json @@ -27,8 +27,8 @@ "components:lint": "ng lint @scion/components", "components:test": "ng test @scion/components", - "components:e2e:run": "cross-env PLAYWRIGHT_BROWSERS_PATH=0 playwright test --config=projects/scion/components.e2e/playwright.config.ts", - "components:e2e:debug": "cross-env PLAYWRIGHT_BROWSERS_PATH=0 PWDEBUG=1 playwright test --config=projects/scion/components.e2e/playwright.config.ts", + "components:e2e:run": "tsc --incremental -p projects/scion/components.e2e/tsconfig.json && cross-env PLAYWRIGHT_BROWSERS_PATH=0 playwright test --config out-tsc/components.e2e", + "components:e2e:debug": "tsc --incremental -p projects/scion/components.e2e/tsconfig.json && cross-env PLAYWRIGHT_BROWSERS_PATH=0 PWDEBUG=1 playwright test --config out-tsc/components.e2e", "components:e2e:lint": "ng lint @scion/components.e2e", "components:build": "ng build --configuration production @scion/components", "components:changelog": "conventional-changelog --commit-path projects/scion/components -k projects/scion/components -t components- -p angular -i CHANGELOG_COMPONENTS.md -s && markdown-include docs/site/changelog-components/changelog.template.json", diff --git a/projects/scion/components.e2e/playwright.config.ts b/projects/scion/components.e2e/playwright.config.ts index a93e4f54..fac86339 100644 --- a/projects/scion/components.e2e/playwright.config.ts +++ b/projects/scion/components.e2e/playwright.config.ts @@ -31,6 +31,6 @@ const config: PlaywrightTestConfig = { }, }, maxFailures: runInCI ? 1 : undefined, - testMatch: /.*\.e2e-spec\.ts/, + testMatch: /.*\.e2e-spec\.js/, }; export default config; diff --git a/projects/scion/components.e2e/tsconfig.json b/projects/scion/components.e2e/tsconfig.json index ac5147bb..7c8cc857 100644 --- a/projects/scion/components.e2e/tsconfig.json +++ b/projects/scion/components.e2e/tsconfig.json @@ -1,10 +1,15 @@ -/* See https://playwright.dev/docs/test-typescript#tsconfigjson */ { - "extends" : "../../../tsconfig.json", - "compilerOptions" : { - "outDir" : "../../../out-tsc/components.e2e", - "module" : "ES2022", - "target" : "ES2022", - "strict" : true + "compilerOptions": { + "baseUrl": "../../../", + "outDir": "../../../out-tsc/components.e2e", + "module": "commonjs", + "sourceMap": true, + "strict": true, + "experimentalDecorators": true, + "moduleResolution": "node", + "target": "es2020", + "types": [ + "node" + ], } }