jsdom-testing-mocks
Version:
A set of tools for emulating browser behavior in jsdom environment
15 lines (12 loc) • 321 B
text/typescript
/**
* @jest-environment node
*/
import { WrongEnvironmentError } from '../../helper';
import { mockDOMRect } from './DOMRect';
describe('mockDOMRect', () => {
it('throws an error when used in a non jsdom environment', () => {
expect(() => {
mockDOMRect();
}).toThrow(WrongEnvironmentError);
});
});