@hyper.software/common-helpers 1.10.13 → 1.10.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var bookingData_1 = require("../../../testingData/bookingData");
4
+ var bookingsService_1 = require("../bookingsService");
5
+ var startDate = '2025-01-05T05:00:00.000Z';
6
+ var endDate = '2025-10-05T05:00:00.000Z';
7
+ describe('WHEN testing .getSeasonalNights()', function () {
8
+ it('SHOULD compute the correct number of nights for case where the whole booking is between the startDate and endDate', function () {
9
+ var nights = (0, bookingsService_1.getSeasonalNights)(bookingData_1.booking1, startDate, endDate);
10
+ expect(nights).toBe(3);
11
+ });
12
+ });
13
+ describe('WHEN testing .getSeasonalNights()', function () {
14
+ it('SHOULD compute the correct number of nights for case where just a part of the booking is between the startDate and endDate', function () {
15
+ var nights = (0, bookingsService_1.getSeasonalNights)(bookingData_1.booking16, startDate, endDate);
16
+ expect(nights).toBe(5);
17
+ });
18
+ });
19
+ describe('WHEN testing .getSeasonalNights()', function () {
20
+ it('SHOULD compute the correct number of nights for case where the booking is not between the startDate and endDate', function () {
21
+ var nights = (0, bookingsService_1.getSeasonalNights)(bookingData_1.booking15, startDate, endDate);
22
+ expect(nights).toBe(0);
23
+ });
24
+ });
25
+ //# sourceMappingURL=bookingsService.%20getSeasonalNights.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bookingsService. getSeasonalNights.test.js","sourceRoot":"","sources":["../../../../src/services/bookingService/__tests__/bookingsService. getSeasonalNights.test.ts"],"names":[],"mappings":";;AAAA,gEAAiF;AACjF,sDAAsD;AAEtD,IAAM,SAAS,GAAG,0BAA0B,CAAA;AAC5C,IAAM,OAAO,GAAG,0BAA0B,CAAA;AAE1C,QAAQ,CAAC,mCAAmC,EAAE;IAC5C,EAAE,CAAC,mHAAmH,EAAE;QACtH,IAAM,MAAM,GAAG,IAAA,mCAAiB,EAAC,sBAAQ,EAAE,SAAS,EAAE,OAAO,CAAC,CAAA;QAC9D,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACxB,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA;AAEF,QAAQ,CAAC,mCAAmC,EAAE;IAC5C,EAAE,CAAC,4HAA4H,EAAE;QAC/H,IAAM,MAAM,GAAG,IAAA,mCAAiB,EAAC,uBAAS,EAAE,SAAS,EAAE,OAAO,CAAC,CAAA;QAC/D,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACxB,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA;AAEF,QAAQ,CAAC,mCAAmC,EAAE;IAC5C,EAAE,CAAC,kHAAkH,EAAE;QACrH,IAAM,MAAM,GAAG,IAAA,mCAAiB,EAAC,uBAAS,EAAE,SAAS,EAAE,OAAO,CAAC,CAAA;QAC/D,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACxB,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -12,3 +12,5 @@ export declare const booking11: any;
12
12
  export declare const booking12: any;
13
13
  export declare const booking13: any;
14
14
  export declare const booking14: any;
15
+ export declare const booking15: any;
16
+ export declare const booking16: any;