computes the stats about the period lengths, started tests
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import chai from 'chai'
|
||||
import periodInfo from '../lib/period-length'
|
||||
|
||||
const expect = chai.expect
|
||||
|
||||
describe('it calculates the median correctly', () => {
|
||||
it('works for an odd-numbered array', () => {
|
||||
const periodLengths = [1, 2, 5, 99, 100]
|
||||
const result = periodInfo(periodLengths).median
|
||||
expect(result).to.eql(5)
|
||||
})
|
||||
|
||||
/* it('works for an even-numbered array', () => {
|
||||
|
||||
}) */
|
||||
})
|
||||
Reference in New Issue
Block a user