Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
liamqma committed Aug 17, 2023
1 parent 7c0ac9a commit 3f6a017
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/babel-plugin/src/css-prop/__tests__/css-map.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,15 @@ describe('css map behaviour', () => {
}).toThrow(ErrorMessages.VARIANT_ACCESS);
});

it('does not support Expression as object property', () => {
it('does not support BinaryExpression as object property', () => {
expect(() => {
transform(`
${styles}
<div css={css(styles['dang' + 'er'])} />;
<div css={css(styles[isDanger?'danger':'success'])} />;
`);
}).toThrow(ErrorMessages.VARIANT_ACCESS);
});

it('does not support BinaryExpression as object property', () => {
expect(() => {
transform(`
${styles}
Expand Down Expand Up @@ -146,7 +144,7 @@ describe('css map behaviour', () => {
}).toThrow(ErrorMessages.NUMBER_OF_ARGUMENT);
});

it('should error out if cssMap does not receive more than one argument', () => {
it('should error out if cssMap receives more than one argument', () => {
expect(() => {
transform(`
import { css, cssMap } from '@compiled/react';
Expand Down

0 comments on commit 3f6a017

Please sign in to comment.