INNER CODE UNIT · TypeScript

mockLocaleStorage

beeequeue/yuna · src/testing/index.ts:21

export const mockLocaleStorage = (mock: Record<string, any>) => {
  for (const key in mock) {
    if (mock.hasOwnProperty(key)) {
      localStorage.__STORE__[key] = mock[key]
    }
  }
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…