Skip to content

Commit

Permalink
refactor(tests): remove unnecessary testdirs cleanup
Browse files Browse the repository at this point in the history
This is now handled internally by tui-sandbox.
  • Loading branch information
mikavilpas committed Nov 6, 2024
1 parent bdc1e5a commit 135d0bd
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions integration-tests/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig } from "cypress"
import { mkdir, readdir, readFile, rm } from "fs/promises"
import { readFile, rm } from "fs/promises"
import path from "path"
import { fileURLToPath } from "url"

Expand All @@ -17,26 +17,9 @@ const yaziLogFile = path.join(

console.log(`yaziLogFile: ${yaziLogFile}`)

const testEnvironmentDir = path.join(__dirname, "test-environment")
const testdirs = path.join(testEnvironmentDir, "testdirs")

export default defineConfig({
e2e: {
setupNodeEvents(on, _config) {
on("after:browser:launch", async (): Promise<void> => {
// delete everything under the ./test-environment/testdirs/ directory
await mkdir(testdirs, { recursive: true })
const files = await readdir(testdirs)

console.log("Cleaning up testdirs directory...")

for (const file of files) {
const testdir = path.join(testdirs, file)
console.log(`Removing ${testdir}`)
await rm(testdir, { recursive: true })
}
})

on("task", {
async removeYaziLog(): Promise<null> {
try {
Expand Down

0 comments on commit 135d0bd

Please sign in to comment.