Additional tests

This commit is contained in:
Angelos Chalaris
2018-11-10 11:12:59 +02:00
parent e24ff01139
commit 34bd448512
5 changed files with 39 additions and 0 deletions

View File

@ -4,3 +4,8 @@ const {hasClass} = require('./_30s.js');
test('hasClass is a Function', () => {
expect(hasClass).toBeInstanceOf(Function);
});
test('hasClass returns the proper value', () => {
let el = document.createElement('div');
el.classList.add('myClass');
expect(hasClass(el, 'myClass')).toBeTruthy();
});