mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-12-19 06:58:15 +08:00
added documentation, js standard style and jest testing to kadane algorithm file.
This commit is contained in:
8
Dynamic-Programming/tests/KadaneAlgo.test.js
Normal file
8
Dynamic-Programming/tests/KadaneAlgo.test.js
Normal file
@@ -0,0 +1,8 @@
|
||||
const fc = require('../kadaneAlgo')
|
||||
test('test1', () => {
|
||||
expect(fc.kadaneAlgo([1, 2, 3, 4, 5])).toBe(15)
|
||||
})
|
||||
|
||||
test('test2', () => {
|
||||
expect(fc.kadaneAlgo([-1, -2, -3, -4, 5])).toBe(5)
|
||||
})
|
||||
Reference in New Issue
Block a user