Skip to content

Commit

Permalink
React: Simplify tests
Browse files Browse the repository at this point in the history
  • Loading branch information
qmonmert committed Sep 23, 2024
1 parent 1954cb4 commit 322fd03
Showing 1 changed file with 2 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,8 @@ import { describe, it, expect } from 'vitest';

import { getLocalStorage, removeLocalStorage, setLocalStorage } from '@/common/services/storage';

describe('setLocalStorage function', () => {
it('should set item in localStorage', () => {
const key = 'key';
const value = 'value';
setLocalStorage(key, value);
expect(getLocalStorage(key)).toEqual(value);
});
});

describe('removeLocalStorage function', () => {
it('should remove item from localstorage', () => {
describe('storage functions', () => {
it('should add and remove item from localstorage', () => {
const key = 'key';
const value = 'value';
setLocalStorage(key, value);
Expand All @@ -21,12 +12,3 @@ describe('removeLocalStorage function', () => {
expect(getLocalStorage(key)).toBeNull();
});
});

describe('getLocalStorage function', () => {
it('should get item from localstorage', () => {
const key = 'key';
const value = 'value';
setLocalStorage(key, value);
expect(getLocalStorage(key)).toEqual(value);
});
});

0 comments on commit 322fd03

Please sign in to comment.