import { defineConfig } from "cypress"; import { resolve } from 'path'; import { mkdir, rm, writeFile } from 'fs/promises'; export default defineConfig({ e2e: { setupNodeEvents(on, config) { // implement node event listeners here on('task', { async resetDb() { console.log(resolve('../iceform-next-sandbox/.db')); await rm('../iceform-next-sandbox/.db', { force: true, recursive: true }); await mkdir('../iceform-next-sandbox/.db'); await writeFile('../iceform-next-sandbox/.db/notes.jsonl', ''); return null; } }); }, }, component: { devServer: { framework: 'next', bundler: 'webpack', }, }, });