Add tests for 2 browser snippets

This commit is contained in:
Angelos Chalaris
2018-10-31 20:00:32 +02:00
parent 231941fed1
commit 082baa8613
2 changed files with 10 additions and 0 deletions

View File

@ -4,3 +4,10 @@ const {createElement} = require('./_30s.js');
test('createElement is a Function', () => {
expect(createElement).toBeInstanceOf(Function);
});
test('createElement creates an element', () => {
expect(createElement(
`<div class="container">
<p>Hello!</p>
</div>`
).className).toEqual('container');
});