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 Oct 9, 2024
1 parent 3b6baff commit 7e898c5
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 7e898c5

Please sign in to comment.