mirror of
https://github.com/pmndrs/zustand.git
synced 2025-12-08 19:45:52 +00:00
Merge branch 'main' into v5
This commit is contained in:
commit
b19acdfab7
@ -636,6 +636,16 @@ describe('with redux middleware', () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
describe('different envs', () => {
|
||||||
|
let savedConsoleWarn: any
|
||||||
|
beforeEach(() => {
|
||||||
|
savedConsoleWarn = console.warn
|
||||||
|
console.warn = vi.fn()
|
||||||
|
})
|
||||||
|
afterEach(() => {
|
||||||
|
console.warn = savedConsoleWarn
|
||||||
|
})
|
||||||
|
|
||||||
it('works in non-browser env', async () => {
|
it('works in non-browser env', async () => {
|
||||||
const originalWindow = global.window
|
const originalWindow = global.window
|
||||||
global.window = undefined as any
|
global.window = undefined as any
|
||||||
@ -657,6 +667,7 @@ it('works in react native env', async () => {
|
|||||||
|
|
||||||
global.window = originalWindow
|
global.window = originalWindow
|
||||||
})
|
})
|
||||||
|
})
|
||||||
|
|
||||||
it('preserves isRecording after setting from devtools', async () => {
|
it('preserves isRecording after setting from devtools', async () => {
|
||||||
const api = createStore(devtools(() => ({ count: 0 }), { enabled: true }))
|
const api = createStore(devtools(() => ({ count: 0 }), { enabled: true }))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user