test: rename persistent (#1315)

This commit is contained in:
huangcheng 2022-09-27 17:15:25 +08:00 committed by GitHub
parent f0ff30f7c4
commit 5ca63d1d63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,7 @@
import create from 'zustand'
import { persist } from 'zustand/middleware'
const createPersistantStore = (initialValue: string | null) => {
const createPersistentStore = (initialValue: string | null) => {
let state = initialValue
const getItem = (): string | null => {
@ -92,7 +92,7 @@ describe('persist middleware with sync configuration', () => {
})
it('can persist state', () => {
const { storage, setItemSpy } = createPersistantStore(null)
const { storage, setItemSpy } = createPersistentStore(null)
const createStore = () => {
const onRehydrateStorageSpy = jest.fn()