Skip to content

Commit

Permalink
Merge pull request #10960 from qmonmert/cleantestsreact
Browse files Browse the repository at this point in the history
React: Simplify tests
  • Loading branch information
murdos authored Sep 26, 2024
2 parents 205e395 + 322fd03 commit c79e2f8
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, expect, it } 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 c79e2f8

Please sign in to comment.