Skip to content

Commit

Permalink
Remove console-testing-library (#4603)
Browse files Browse the repository at this point in the history
* Fix `console` spy related issues in `queryFn.test.tsx`

* Fix issues related to stubbing envs in `getDefaultMiddleware.test.ts`

* Remove `satisfies` operators in `queryFn.test.tsx`

* Remove `console-testing-library` as it is no longer needed
  • Loading branch information
aryaemami59 authored Jan 3, 2025
1 parent fa97936 commit aaeda15
Show file tree
Hide file tree
Showing 2 changed files with 1,259 additions and 1,188 deletions.
7 changes: 3 additions & 4 deletions packages/toolkit/src/tests/getDefaultMiddleware.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ import { buildGetDefaultMiddleware } from '@internal/getDefaultMiddleware'
const getDefaultMiddleware = buildGetDefaultMiddleware()

describe('getDefaultMiddleware', () => {
const ORIGINAL_NODE_ENV = process.env.NODE_ENV

afterEach(() => {
process.env.NODE_ENV = ORIGINAL_NODE_ENV
vi.unstubAllEnvs()
})

describe('Production behavior', () => {
Expand All @@ -26,7 +24,8 @@ describe('getDefaultMiddleware', () => {
})

it('returns an array with only redux-thunk in production', async () => {
process.env.NODE_ENV = 'production'
vi.stubEnv('NODE_ENV', 'production')

const { thunk } = await import('redux-thunk')
const { buildGetDefaultMiddleware } = await import(
'@internal/getDefaultMiddleware'
Expand Down
Loading

0 comments on commit aaeda15

Please sign in to comment.