Archived
razer should be a-ok
This commit is contained in:
1 parent
7fd47915ae
commit
7693697990
142 files changed
+22252
No files matched your search
@@ -0,0 +1,19 @@
|
||||
'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);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user