mirror of
https://github.com/mediacms-io/mediacms.git
synced 2026-03-22 12:33:11 -04:00
chore: minor code enhancements
This commit is contained in:
@@ -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]', () => {
|
||||
|
||||
Reference in New Issue
Block a user