UNPKG

differencebetweentimes

Version:

A node package to show the difference between two or more formated times.

11 lines (8 loc) 653 B
assert = require 'assert' differencebetweentimes = require '../lib/differencebetweentimes' describe """#differenceBetweenTimes is the public API from lib - returns the difference between the first time/index from parameter and the another indexes""", -> it 'basic difference between two times', -> assert.deepEqual differencebetweentimes.differenceBetweenTimes(['00.500', '01.000']), ['00.500', '+00.500'] it 'difference between 3 times with negative and positive difference times', -> assert.deepEqual differencebetweentimes.differenceBetweenTimes(['1:14.098', '1:13.998', '1:14.198']), ['1:14.098', '-00.100', '+00.100']