nexxtway/react-rainbow

View on GitHub
src/components/Drawer/helpers/__test__/getSlideFrom.spec.js

Summary

Maintainability
A
3 hrs
Test Coverage
import getSlideFrom from '../getSlideFrom';

describe('getSlideFrom', () => {
    it('should return left', () => {
        const values = ['left', null, undefined, {}, '', 0, 31];
        values.forEach(value => {
            expect(getSlideFrom(value, 'left')).toBe('left');
        });
    });
    it('should return right', () => {
        const values = ['right', null, undefined, {}, '', 0, 31];
        values.forEach(value => {
            expect(getSlideFrom(value, 'right')).toBe('right');
        });
    });
});