diff options
author | Andinus <andinus@nand.sh> | 2021-08-25 20:10:19 +0530 |
---|---|---|
committer | Andinus <andinus@nand.sh> | 2021-08-25 20:10:19 +0530 |
commit | 3fb698bbe091cbaa8d5d3f2256ebfb776523448d (patch) | |
tree | 46afb9bc82dd810ef9b7b21ed15056721373fe18 /javascript/square-root/square-root.spec.js | |
parent | 094df4feb1fc02197029764e4f748c9680150574 (diff) | |
download | exercism-3fb698bbe091cbaa8d5d3f2256ebfb776523448d.tar.gz |
JS: Solve hello-world, two-fer, square-root
Diffstat (limited to 'javascript/square-root/square-root.spec.js')
-rw-r--r-- | javascript/square-root/square-root.spec.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/javascript/square-root/square-root.spec.js b/javascript/square-root/square-root.spec.js new file mode 100644 index 0000000..3db6fcb --- /dev/null +++ b/javascript/square-root/square-root.spec.js @@ -0,0 +1,22 @@ +import { squareRoot } from './square-root'; + +describe('Square root', () => { + test('root of 1', () => { + expect(squareRoot(1)).toEqual(1); + }); + test('root of 4', () => { + expect(squareRoot(4)).toEqual(2); + }); + test('root of 5', () => { + expect(squareRoot(25)).toEqual(5); + }); + test('root of 81', () => { + expect(squareRoot(81)).toEqual(9); + }); + test('root of 196', () => { + expect(squareRoot(196)).toEqual(14); + }); + test('root of 65025', () => { + expect(squareRoot(65025)).toEqual(255); + }); +}); |