Merge branch 'main' into v5

This commit is contained in:
daishi 2024-03-09 08:52:19 +09:00
commit b19acdfab7

View File

@ -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 }))