Skip to content

Commit

Permalink
Fix issues related to stubbing envs in createSlice.test.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
aryaemami59 committed Sep 4, 2024
1 parent 75f3768 commit 9a8f521
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/toolkit/src/tests/createSlice.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -394,14 +394,12 @@ describe('createSlice', () => {
})

describe('Deprecation warnings', () => {
let originalNodeEnv = process.env.NODE_ENV

beforeEach(() => {
vi.resetModules()
})

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

// NOTE: This needs to be in front of the later `createReducer` call to check the one-time warning
Expand Down

0 comments on commit 9a8f521

Please sign in to comment.