This commit is contained in:
Chris Nutter committed 2020-09-07 14:15:13 -07:00
1 parent 7693697990
commit e3c2d1b295
142 files changed
-22252

No files matched your search

@@ -1,17 +0,0 @@
'use babel';
import toCamelCase from '../../lib/helper/to-camel-case';
describe('camelCaseHelper', () => {
it('should convert spaces to camelCase', () => {
expect(toCamelCase('hello world')).toEqual('helloWorld');
});
it('should convert lisp-case to camelCase', () => {
expect(toCamelCase('hello-world')).toEqual('helloWorld');
});
it('should convert snake_case to camelCase', () => {
expect(toCamelCase('hello_world')).toEqual('helloWorld');
});
});
@@ -1,19 +0,0 @@
'use babel';
import toggleClassName from '../../lib/helper/toggle-class-name';
describe('className toggle helper', () => {
const root = document.documentElement;
it('should add a className to the root element', () => {
expect(root.classList.contains('testClass')).toBe(false);
toggleClassName('testClass', true);
expect(root.classList.contains('testClass')).toBe(true);
});
it('should remove a className from the root element', () => {
expect(root.classList.contains('testClass')).toBe(true);
toggleClassName('testClass', false);
expect(root.classList.contains('testClass')).toBe(false);
});
});