Skip to content

Commit

Permalink
Use TS for Cypress config
Browse files Browse the repository at this point in the history
As browserify-preprocessor is no longer needed and plugin files are no longer supported by Cypress, we can consolidate the plugins into 'cypress.config.ts'
  • Loading branch information
JacobArrow committed Oct 28, 2024
1 parent dacb795 commit 62ca0f5
Show file tree
Hide file tree
Showing 5 changed files with 122 additions and 1,215 deletions.
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@
"cypress/support/index.ts",
"scripts/postcss-node-sass.js",
"scripts/post-process-generated-graphql.ts",
"cypress/utils/graphql-test-utils.ts"
"cypress/utils/graphql-test-utils.ts",
"cypress.config.ts"
]
}
],
Expand Down
11 changes: 6 additions & 5 deletions cypress.config.js → cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// eslint-disable-next-line import/no-extraneous-dependencies
const { defineConfig } = require("cypress");
const plugins = require("./cypress/plugins");
import { defineConfig } from "cypress";
import task from "@cypress/code-coverage/task";

module.exports = defineConfig({
export default defineConfig({
projectId: "4trcdv",
defaultCommandTimeout: 10000,
pageLoadTimeout: 10000,
Expand All @@ -17,7 +16,9 @@ module.exports = defineConfig({
baseUrl: "http://localhost:57021",
testIsolation: false,
setupNodeEvents(on, config) {
return plugins(on, config);
task(on, config);

return config;
}
}
});
28 changes: 0 additions & 28 deletions cypress/plugins/index.js

This file was deleted.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
"@babel/preset-typescript": "^7.26.0",
"@chromatic-com/storybook": "^3",
"@csstools/postcss-sass": "^5.1.1",
"@cypress/browserify-preprocessor": "^3.0.2",
"@cypress/code-coverage": "^3.13.4",
"@graphql-codegen/add": "^3.1.1",
"@graphql-codegen/cli": "^2.6.2",
Expand Down
Loading

0 comments on commit 62ca0f5

Please sign in to comment.