Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
ssong10 committed Jul 8, 2024
1 parent 542edcb commit bde885b
Showing 1 changed file with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,7 @@ const pseudoHoverProp = createSystemProp({

describe('createInterpolation', () => {
const { theme } = useCurrentTheme();

const interpolation = createInterpolation([widthProp, heightProp, marginProp, pseudoHoverProp])({
theme,
breakpointIndex: 0,
});
const interpolation = createInterpolation([widthProp, heightProp, marginProp, pseudoHoverProp]);

let props: Record<string, any>;

Expand All @@ -55,7 +51,7 @@ describe('createInterpolation', () => {
});

it('systemProp return value is merged by media query key', () => {
expect(interpolation(props)).toStrictEqual({
expect(interpolation({ theme, props })).toStrictEqual({
width: 100,
height: 100,
'@media screen and (min-width: 640px)': {
Expand All @@ -72,7 +68,7 @@ describe('createInterpolation', () => {
});

it('should removed non-systemProp key', () => {
expect(interpolation(props)).toStrictEqual({ width: 100 });
expect(interpolation({ theme, props })).toStrictEqual({ width: 100 });
});
});

Expand All @@ -82,7 +78,7 @@ describe('createInterpolation', () => {
});

it('should return empty object', () => {
expect(interpolation(props)).toStrictEqual({});
expect(interpolation({ theme, props })).toStrictEqual({});
});
});

Expand All @@ -92,7 +88,7 @@ describe('createInterpolation', () => {
});

it('should return empty object', () => {
expect(interpolation(props)).toStrictEqual({});
expect(interpolation({ theme, props })).toStrictEqual({});
});
});
});
Expand All @@ -103,7 +99,7 @@ describe('createInterpolation', () => {
});

it('should return return value of all nested systemProp', () => {
expect(interpolation(props)).toStrictEqual({
expect(interpolation({ theme, props })).toStrictEqual({
'&:hover': { margin: 3 },
});
});
Expand Down

0 comments on commit bde885b

Please sign in to comment.