uniswap-interface-uncensored/cypress.config.ts
Zach Pomerantz 86677ed193
test(staging): add staging-only t9n test (#6899)
* test(staging): add staging-only test

* test(staging): translations mount

* ci(t9n): download translations from crowdin

* test: proving that it works

* Revert "ci(t9n): download translations from crowdin"

This reverts commit b6e0f0c5c296c3ad4166419d72e9b2ebd053be87.

* Revert "test: proving that it works"

This reverts commit 1d3a1c2a2377e1a3b790f706c42b7169a47e59fd.

* fix: spec->test

---------

Co-authored-by: UL Service Account <hello-happy-puppy@users.noreply.github.com>
2023-07-07 09:41:20 -07:00

34 lines
1.2 KiB
TypeScript

import codeCoverageTask from '@cypress/code-coverage/task'
import { defineConfig } from 'cypress'
import { setupHardhatEvents } from 'cypress-hardhat'
import { unlinkSync } from 'fs'
export default defineConfig({
projectId: 'yp82ef',
defaultCommandTimeout: 24000, // 2x average block time
chromeWebSecurity: false,
experimentalMemoryManagement: true, // better memory management, see https://github.com/cypress-io/cypress/pull/25462
retries: { runMode: 2 },
videoCompression: false,
e2e: {
async setupNodeEvents(on, config) {
await setupHardhatEvents(on, config)
codeCoverageTask(on, config)
// Delete recorded videos for specs that passed without flakes.
on('after:spec', async (spec, results) => {
if (results && results.video) {
// If there were no failures (including flakes), delete the recorded video.
if (!results.tests?.some((test) => test.attempts.some((attempt) => attempt?.state === 'failed'))) {
unlinkSync(results.video)
}
}
})
return config
},
baseUrl: 'http://localhost:3000',
specPattern: 'cypress/{e2e,staging}/**/*.test.ts',
},
})