Skip to content

Commit

Permalink
style: Combine Tests Related to Test Running Env
Browse files Browse the repository at this point in the history
  • Loading branch information
ITenthusiasm committed Nov 17, 2023
1 parent 3b00695 commit 4025d2a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
beforeEach(jest.restoreAllMocks)

test('Testing Utilities with global access to `afterEach()` will not log warnings', () => {
jest.spyOn(console, 'warn')
global.afterEach = () => {}

require('..')
expect(console.warn).not.toHaveBeenCalled()
})

test('Testing Utilities lacking a global `afterEach` function will log a warning ONCE', () => {
delete global.afterEach
const warn = jest.spyOn(console, 'warn')
Expand Down
7 changes: 0 additions & 7 deletions src/__tests__/auto-cleanup-vitest-globals.js

This file was deleted.

0 comments on commit 4025d2a

Please sign in to comment.