chore: minor code enhancements

This commit is contained in:
Yiannis
2026-03-21 16:38:30 +02:00
parent c8b47a7922
commit 20682a543a
18 changed files with 115 additions and 103 deletions

View File

@@ -1,6 +1,8 @@
import React from 'react';
import { render } from '@testing-library/react';
import { usePopup } from '../../../src/static/js/utils/hooks/usePopup';
// Mock popup components to avoid SCSS imports breaking Jest
jest.mock('../../../src/static/js/components/_shared/popup/Popup.jsx', () => {
const React = require('react');
@@ -16,8 +18,6 @@ jest.mock('../../../src/static/js/components/_shared/popup/PopupTrigger.jsx', ()
PopupTrigger: (props: any) => React.createElement('div', props, props.children),
}));
import { usePopup } from '../../../src/static/js/utils/hooks/usePopup';
describe('utils/hooks', () => {
describe('usePopup', () => {
test('Returns a 3-tuple: [ref, PopupContent, PopupTrigger]', () => {