Files
30-seconds-of-code/test/httpPost.test.js
Angelos Chalaris 75763a029c Additional tests
2018-11-10 13:55:04 +02:00

13 lines
358 B
JavaScript

const expect = require('expect');
const {httpPost} = require('./_30s.js');
test('httpPost is a Function', () => {
expect(httpPost).toBeInstanceOf(Function);
});
test('httpPost does not throw errors', () => {
expect(() => {
httpPost('http://localhost', x => x, console.log);
httpPost('http://localhost', x => x);
}).not.toThrow(TypeError);
});