Additional tests

This commit is contained in:
Angelos Chalaris
2018-11-07 15:03:27 +02:00
parent 03f554845d
commit e815dd1dfb
5 changed files with 29 additions and 7 deletions

View File

@ -4,3 +4,10 @@ const {insertAfter} = require('./_30s.js');
test('insertAfter is a Function', () => {
expect(insertAfter).toBeInstanceOf(Function);
});
let e = document.createElement('div');
e.setAttribute("id", "test");
test('Does not throw error if the element exists', () => {
expect(() => {
insertAfter(e, '<span>test</span>');
}).not.toThrow(TypeError);
});