Skip to content

Commit

Permalink
added tests for divide function
Browse files Browse the repository at this point in the history
  • Loading branch information
Clara Tersi authored and Clara Tersi committed Sep 1, 2019
1 parent 8f51ffc commit 178bbe8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/operations/divide.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const assert = require('assert');
const { divide } = require('../../src/operations');

describe('divide', function() {
it('should throw an error if divisor equals 0', function() {
assert.throws(() => divide(2, 0));
});
});

0 comments on commit 178bbe8

Please sign in to comment.