Skip to content

Commit

Permalink
add pow
Browse files Browse the repository at this point in the history
  • Loading branch information
robertoachar committed Apr 19, 2018
1 parent 761be49 commit 265dba4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ module.exports.multiply = (x, y) => {
module.exports.divide = (x, y) => {
return x / y;
};

module.exports.pow = (x, y) => {
return x ** y;
};
7 changes: 7 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,10 @@ describe('DIVIDE Tests', () => {
done();
});
});

describe('POW Tests', () => {
test('should return 4', (done) => {
expect(calculator.pow(2, 2)).toBe(4);
done();
});
});

0 comments on commit 265dba4

Please sign in to comment.