UNPKG

decova-dotnet

Version:

This package provides fundumentals that a .net developer may miss while working with Typescript, whether they are missing functinalities or funcionalities provided in a non-elegant design in javascript. Bad naming, bad design of optional parameters, non-c

21 lines 1.19 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const index_1 = require("../src/index"); const chai_1 = require("chai"); describe('TimeSpan', () => { it('Parse() to work correctly', () => { (0, chai_1.expect)(index_1.TimeSpan.parse(' 7 ').ticks) .equals(index_1.TimeSpan.fromDays(7).ticks); (0, chai_1.expect)(index_1.TimeSpan.parse(' 7 48').ticks) .equals(index_1.TimeSpan.fromDays(9).ticks); (0, chai_1.expect)(index_1.TimeSpan.parse('5 28 30').ticks) .equals(index_1.TimeSpan.fromDays(6).addHours(4).addMinutes(30).ticks); (0, chai_1.expect)(index_1.TimeSpan.parse('5 28 70').ticks) .equals(index_1.TimeSpan.fromDays(6).addHours(5).addMinutes(10).ticks); (0, chai_1.expect)(index_1.TimeSpan.parse('1 2 30').ticks) .equals(index_1.TimeSpan.fromDays(1).addHours(2).addMinutes(30).ticks); (0, chai_1.expect)(index_1.TimeSpan.parse('1 2 30 50 456').ticks) .equals(index_1.TimeSpan.fromDays(1).addHours(2).addMinutes(30).addSeconds(50).addMilliSeconds(456).ticks); }); }); //# sourceMappingURL=TimeSpan.spec.js.map