Files
blog/source/admin/setupTestFramework.js
2025-08-25 20:24:23 +08:00

14 lines
299 B
JavaScript

/* eslint-disable @emotion/no-vanilla */
import '@testing-library/jest-dom/extend-expect';
import fetch from 'node-fetch';
jest.mock('path', () => {
const actual = jest.requireActual('path');
return {
...actual.posix,
};
});
window.fetch = fetch;
window.URL.createObjectURL = jest.fn();