Skip to content

Commit

Permalink
restore all mocks on file base
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-bromann committed Jun 12, 2023
1 parent b9f6bb6 commit b61aaa9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion tests/cli.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import cp from 'node:child_process'
import { describe, it, expect, vi, beforeAll, afterAll } from 'vitest'
import { describe, it, expect, vi, afterAll } from 'vitest'

import { runme } from '../src/cli.js'

Expand Down Expand Up @@ -28,3 +28,7 @@ describe('RunmeJS CLI', () => {
).toBe(true)
})
})

afterAll(() => {
vi.restoreAllMocks()
})
1 change: 1 addition & 0 deletions tests/download.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ describe('CLI Download', () => {
})

afterAll(() => {
vi.restoreAllMocks()
console.log = consoleLog
console.table = consoleTable
})
1 change: 0 additions & 1 deletion vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export default defineConfig({
],
testTimeout: 30 * 1000,
watch: false,
restoreMocks: true,
coverage: {
enabled: false
}
Expand Down

0 comments on commit b61aaa9

Please sign in to comment.