返回 slidev
cypress.config.ts
根目录 / cypress.config.ts
1 import { defineConfig } from 'cypress'
2 import { startBasePathServer, stopBasePathServer } from './cypress/basePathServer'
3
4 export default defineConfig({
5 e2e: {
6 baseUrl: 'http://localhost:3041',
7 chromeWebSecurity: false,
8 specPattern: 'cypress/e2e/**/*.spec.*',
9 supportFile: false,
10 setupNodeEvents(on) {
11 on('after:run', async () => {
12 await stopBasePathServer()
13 })
14 on('task', {
15 startBasePathServer,
16 stopBasePathServer,
17 })
18 },
19 },
20 })
21
21 lines TYPESCRIPT