Add test case for valid arguments

This commit is contained in:
lonyele 2019-06-14 05:12:06 +09:00
parent 73fca95969
commit 64e0c74ada

View File

@ -1,6 +1,16 @@
import { lightenColor as lighten, darkenColor as darken } from '../utils';
describe('utils', () => {
it('should apply polished when valid arguments are passed', () => {
const lightColor = '#F6F9FC';
const darkColor = '#2f2f2f';
const darkenedColor = darken(lightColor);
const lightenedColor = lighten(darkColor);
expect(darkenedColor).toEqual('rgba(0,0,0,0.95)');
expect(lightenedColor).toEqual('rgba(255,255,255,0.95)');
});
it('should guard non-string value is being passed to color of theme object', () => {
const result = () => {
return lighten(1234);