UNPKG

@yoroi/common

Version:

The Common package of Yoroi SDK

49 lines (48 loc) 1.51 kB
"use strict"; var _time = require("./time"); describe('time constants', () => { it.each` constant | value ${_time.time.oneSecond} | ${1000} ${_time.time.oneMinute} | ${60000} ${_time.time.fiveMinutes} | ${300000} ${_time.time.halfHour} | ${1800000} ${_time.time.oneHour} | ${3600000} ${_time.time.oneDay} | ${86400000} ${_time.time.oneWeek} | ${604800000} ${_time.time.oneMonth} | ${2592000000} ${_time.time.sixMonths} | ${15768000000} ${_time.time.oneYear} | ${31536000000} `('should have correct value for $constant', _ref => { let { constant, value } = _ref; expect(constant).toBe(value); }); }); describe('time helpers', () => { it.each` helper | input | expected ${_time.time.seconds} | ${10} | ${10000} ${_time.time.minutes} | ${10} | ${600000} ${_time.time.hours} | ${10} | ${36000000} ${_time.time.days} | ${10} | ${864000000} ${_time.time.weeks} | ${10} | ${6048000000} ${_time.time.months} | ${10} | ${25920000000} ${_time.time.years} | ${10} | ${315360000000} `('should return correct value for $helper with input $input', _ref2 => { let { helper, input, expected } = _ref2; expect(helper(input)).toBe(expected); }); }); describe('time session', () => { it('should have correct value for session', () => { expect(_time.time.session).toBe(Infinity); }); }); //# sourceMappingURL=time.test.js.map