Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: format files
Browse files Browse the repository at this point in the history
KristinaSpasevska committed Nov 14, 2023
1 parent f559ff6 commit b40d930
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/apps/tools/src/utils/__tests__/persist.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Cookies from 'js-cookie';
import { describe, expect, test, vi } from 'vitest';
import * as persist from '../persist';
import Cookies from "js-cookie";


describe('getName', () => {
test('getting a prefixed name', () => {
@@ -13,7 +12,9 @@ describe('getName', () => {

describe('getItem', () => {
test('get cookie item', () => {
const getSpy = vi.spyOn(Cookies, 'get').mockReturnValueOnce({ '_persist:myCookie': 'omnomnom'});
const getSpy = vi
.spyOn(Cookies, 'get')
.mockReturnValueOnce({ '_persist:myCookie': 'omnomnom' });
const cookieName = 'myCookie';
persist.getItem(cookieName);

@@ -24,7 +25,9 @@ describe('getItem', () => {

describe('purge', () => {
test('remove cookies', () => {
vi.spyOn(persist, 'getItems').mockImplementation(() => ({ 'cookie': 'some_random_cookie' }));
vi.spyOn(persist, 'getItems').mockImplementation(() => ({
cookie: 'some_random_cookie',
}));

vi.spyOn(persist, 'deleteItem').mockImplementation(() => {});

0 comments on commit b40d930

Please sign in to comment.