Skip to content

Commit

Permalink
test(sx tests): add tests for sx
Browse files Browse the repository at this point in the history
Signed-off-by: Niloy Sikdar <niloysikdar30@gmail.com>
  • Loading branch information
niloysikdar committed Jun 26, 2022
1 parent 1f8ea14 commit b4765fc
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { sx } from './stylings';
export { sx } from './sx';
export { makeStyles } from './makeStyles';
26 changes: 26 additions & 0 deletions src/utils/sx.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { CSSProperties } from 'react';
import { sx } from './sx';

const primary: CSSProperties = {
color: 'red',
backgroundColor: 'blue',
};

const button: CSSProperties = {
color: 'yellow',
borderRadius: '10px',
};

const expectedStyle: CSSProperties = {
color: 'yellow',
backgroundColor: 'blue',
borderRadius: '10px',
};

describe('sx tests', () => {
test('combining primary and button styles with sx should return expectedStyle', () => {
const style = sx(primary, button);

expect(style).toEqual(expectedStyle);
});
});
File renamed without changes.

0 comments on commit b4765fc

Please sign in to comment.