Travis build: 613 [custom]
This commit is contained in:
5
test/heronArea/heronArea.js
Normal file
5
test/heronArea/heronArea.js
Normal file
@ -0,0 +1,5 @@
|
||||
const heronArea = (side_a, side_b, side_c) => {
|
||||
const p = (side_a + side_b + side_c) / 2
|
||||
return Math.sqrt(p * (p-side_a) * (p-side_b) * (p-side_c))
|
||||
};
|
||||
module.exports = heronArea;
|
||||
6
test/heronArea/heronArea.test.js
Normal file
6
test/heronArea/heronArea.test.js
Normal file
@ -0,0 +1,6 @@
|
||||
const expect = require('expect');
|
||||
const heronArea = require('./heronArea.js');
|
||||
|
||||
test('heronArea is a Function', () => {
|
||||
expect(heronArea).toBeInstanceOf(Function);
|
||||
});
|
||||
Reference in New Issue
Block a user