Skip to content

Commit 1049f92

Browse files
committed
test: update
1 parent b83963f commit 1049f92

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/unique.test.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,10 @@ describe('Trigger.Unique', () => {
212212
// Check that FloatBg has the custom background style
213213
const floatBg = document.querySelector('.rc-trigger-popup-float-bg');
214214
expect(floatBg).toBeTruthy();
215-
const computedStyle = window.getComputedStyle(floatBg);
216-
expect(computedStyle.backgroundColor).toBe('red');
217-
expect(computedStyle.border).toContain('1px solid blue');
215+
expect(floatBg).toHaveStyle({
216+
backgroundColor: 'red',
217+
border: '1px solid blue',
218+
});
218219
});
219220

220221
it('should not apply any additional className to FloatBg when uniqueBgClassName is not provided', async () => {

0 commit comments

Comments
 (0)