Skip to content

Commit

Permalink
Refactor unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano committed Feb 7, 2023
1 parent e225bf5 commit 2945982
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions packages/components/src/color-palette/test/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,7 @@ describe( 'ColorPalette: Utils', () => {
} );
test( 'should return the background color computed from a element if the color value is a CSS variable', () => {
const element = document.createElement( 'div' );
const { ownerDocument } = element;
const { defaultView } = ownerDocument;
// @ts-ignore
defaultView.getComputedStyle = () => ( {
backgroundColor: '#ff0000',
} );
element.style.backgroundColor = '#ff0000';
expect( normalizeColorValue( 'var(--red)', element ) ).toBe(
'#ff0000'
);
Expand Down

0 comments on commit 2945982

Please sign in to comment.