import { cachedData, getCurrentHoverElement, setCurrentHoverElement, addInteractionClass, } from '~/code_navigation/utils'; afterEach(() => { if (cachedData.has('current')) { cachedData.delete('current'); } }); describe('getCurrentHoverElement', () => { it.each` value ${'test'} ${undefined} `('it returns cached current key', ({ value }) => { if (value) { cachedData.set('current', value); } expect(getCurrentHoverElement()).toEqual(value); }); }); describe('setCurrentHoverElement', () => { it('sets cached current key', () => { setCurrentHoverElement('test'); expect(getCurrentHoverElement()).toEqual('test'); }); }); describe('addInteractionClass', () => { beforeEach(() => { setFixtures( '