Files
30-seconds-of-code/test/nodeListToArray.test.js
Angelos Chalaris e35777176f Additional tests
2018-11-10 12:01:25 +02:00

10 lines
318 B
JavaScript

const expect = require('expect');
const {nodeListToArray} = require('./_30s.js');
test('nodeListToArray is a Function', () => {
expect(nodeListToArray).toBeInstanceOf(Function);
});
test('nodeListToArray returns an array of proper length', () => {
expect(nodeListToArray(document.childNodes).length).toBe(2);
});