Skip to content
This repository was archived by the owner on Nov 4, 2025. It is now read-only.

Commit 93641c5

Browse files
committed
test: fix test case
1 parent 4c6b10b commit 93641c5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/element.test.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
/* eslint-disable class-methods-use-this */
22
import React from 'react';
33
import { mount } from 'enzyme';
4+
import { spyElementPrototype } from 'rc-util/lib/test/domHook';
45
import Align from '../src';
56

67
describe('element align', () => {
8+
beforeAll(() => {
9+
spyElementPrototype(HTMLElement, 'offsetParent', {
10+
get: () => ({}),
11+
});
12+
});
13+
714
beforeEach(() => {
815
jest.useFakeTimers();
916
});

0 commit comments

Comments
 (0)