This repository was archived by the owner on Feb 20, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +28
-0
lines changed Expand file tree Collapse file tree 3 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import startsWith from './startsWith'
2020import removeDuplicates from './remove-duplicates'
2121import add from './add'
2222import subtract from './subtract'
23+ import subtraction from './subtraction'
2324import divide from './divide'
2425import multiply from './multiply'
2526import square from './square'
@@ -74,4 +75,6 @@ export {
7475 round ,
7576 checkPalindrome ,
7677 isFunction ,
78+ subtraction ,
7779}
80+
Original file line number Diff line number Diff line change 1+ export default subtraction
2+
3+ /**
4+ *
5+ * This method will return a random integer
6+ * between min and max number
7+ *
8+ * @param {Number } num1 - The first number to be subtracted
9+ * @param {Number } max - The second number to subtract from
10+ * @return {Number } the subtraction of num1 - num2
11+ */
12+
13+ function subtraction ( num1 , num2 ) {
14+ return num1 - num2
15+ }
Original file line number Diff line number Diff line change 1+ import test from 'ava'
2+ import subtraction from '../src/subtraction'
3+
4+ test ( 'Subtracts two integers ' , t => {
5+ const number1 = 23
6+ const number2 = 3
7+ const expected = 23 - 3
8+ const actual = subtraction ( number1 , number2 )
9+ t . deepEqual ( actual , expected )
10+ } )
You can’t perform that action at this time.
0 commit comments