diff --git a/.eslintrc.yaml b/.eslintrc.yaml index 63515520ad9fdbeb95171f7b7bdb0d726c7002a5..b889a5e7fa68878a181d3cf81f632ebfc2831e69 100644 --- a/.eslintrc.yaml +++ b/.eslintrc.yaml @@ -16,6 +16,9 @@ extends: - plugin:import/typescript - plugin:prettier/recommended - prettier # Removes eslint rules that conflict with prettier. + # Recommended by jest-playwright + # https://github.com/playwright-community/jest-playwright#globals + - plugin:jest-playwright/recommended rules: # Sometimes you need to add args to implement a function signature even @@ -32,7 +35,13 @@ rules: "@typescript-eslint/no-extra-semi": off eqeqeq: error import/order: - [error, { alphabetize: { order: "asc" }, groups: [["builtin", "external", "internal"], "parent", "sibling"] }] + [ + error, + { + alphabetize: { order: "asc" }, + groups: [["builtin", "external", "internal"], "parent", "sibling"], + }, + ] no-async-promise-executor: off # This isn't a real module, just types, which apparently doesn't resolve. import/no-unresolved: [error, { ignore: ["express-serve-static-core"] }] diff --git a/package.json b/package.json index 059c53375c1cf8e73996412011f7edbd20f39f11..0d94c3aa0b918191311dcaf19877accde0bcd24b 100644 --- a/package.json +++ b/package.json @@ -61,6 +61,7 @@ "eslint-config-prettier": "^8.1.0", "eslint-import-resolver-alias": "^1.1.2", "eslint-plugin-import": "^2.18.2", + "eslint-plugin-jest-playwright": "^0.2.1", "eslint-plugin-prettier": "^3.1.0", "istanbul-badges-readme": "^1.2.0", "leaked-handles": "^5.2.0", diff --git a/test/jest.e2e.config.ts b/test/jest.e2e.config.ts index e2a7a144859f22261d84a21379b1011431d42af0..6f0fa73a70d4e223c3b6754250c68e88f920245c 100644 --- a/test/jest.e2e.config.ts +++ b/test/jest.e2e.config.ts @@ -7,7 +7,13 @@ const config: Config.InitialOptions = { "^.+\\.ts$": "/node_modules/ts-jest", }, globalSetup: "/utils/globalSetup.ts", - testEnvironment: "node", + testEnvironmentOptions: { + "jest-playwright": { + // TODO enable on webkit as well + // waiting on https://github.com/playwright-community/jest-playwright/issues/659 + browsers: ["chromium", "firefox"], + }, + }, testPathIgnorePatterns: ["/node_modules/", "/lib/", "/out/", "test/unit"], testTimeout: 30000, modulePathIgnorePatterns: [ diff --git a/yarn.lock b/yarn.lock index c96f175c22673ac535106c20da86bccdf005f25c..0bb8e9de10d42e450f65e9962d34f60a4791efaa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3164,6 +3164,11 @@ eslint-plugin-import@^2.18.2: resolve "^1.17.0" tsconfig-paths "^3.9.0" +eslint-plugin-jest-playwright@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest-playwright/-/eslint-plugin-jest-playwright-0.2.1.tgz#8778fee9d5915132a03d94370d3eea0a7ddd08f3" + integrity sha512-BicKUJUpVPsLbHN8c5hYaZn6pv8PCMjBGHXUfvlY1p75fh4APVfX2gTK14HuiR8/Bv3fKBQu5MTaqCro4E3OHg== + eslint-plugin-prettier@^3.1.0: version "3.3.1" resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.3.1.tgz#7079cfa2497078905011e6f82e8dd8453d1371b7"