Add tests for 2 browser snippets
This commit is contained in:
@ -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');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user