test(web-app): add cypress for unit test
This commit is contained in:
27
web-app/cypress.config.ts
Normal file
27
web-app/cypress.config.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { defineConfig } from "cypress";
|
||||
|
||||
export default defineConfig({
|
||||
e2e: {
|
||||
specPattern: "tests/e2e/*.spec.ts",
|
||||
baseUrl: "http://localhost:8080",
|
||||
supportFile: "tests/support/e2e.ts",
|
||||
setupNodeEvents(on, config) {
|
||||
on("before:browser:launch", (browser, launchOptions) => {
|
||||
// Allow tests to run even if baseUrl is not available
|
||||
// This is useful for unit tests that don't need a server
|
||||
if (process.env.CYPRESS_SKIP_SERVER_CHECK === "true") {
|
||||
config.baseUrl = null;
|
||||
return config;
|
||||
}
|
||||
return launchOptions;
|
||||
});
|
||||
},
|
||||
},
|
||||
component: {
|
||||
devServer: {
|
||||
framework: "vue",
|
||||
bundler: "webpack",
|
||||
},
|
||||
specPattern: "src/**/*.cy.ts",
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user