From 0f90f0d7d4379faee356743b9e215dbd4fc6affb Mon Sep 17 00:00:00 2001 From: AASHISH MALIK Date: Wed, 11 Oct 2023 15:07:58 +0530 Subject: [PATCH] fix: move to utility --- src/v0/destinations/campaign_manager/util.test.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/v0/destinations/campaign_manager/util.test.js b/src/v0/destinations/campaign_manager/util.test.js index e56aa9abcd..8f69b57a9f 100644 --- a/src/v0/destinations/campaign_manager/util.test.js +++ b/src/v0/destinations/campaign_manager/util.test.js @@ -2,22 +2,22 @@ const { convertToMicroseconds } = require('./util'); describe('convertToMicroseconds utility test', () => { it('ISO 8601 input', () => { - expect(1609748704780000).toEqual(convertToMicroseconds('2021-01-04T08:25:04.780Z')); + expect(convertToMicroseconds('2021-01-04T08:25:04.780Z')).toEqual(1609748704780000); }); it('unix microseconds input', () => { - expect(1668624722903333).toEqual(convertToMicroseconds('1668624722903333')); + expect(convertToMicroseconds('1668624722903333')).toEqual(1668624722903333); }); it('non numeric time input', () => { - expect(1668624722903000).toEqual(convertToMicroseconds('2022-11-17T00:22:02.903+05:30')); + expect(convertToMicroseconds('2022-11-17T00:22:02.903+05:30')).toEqual(1668624722903000); }); it('unix seconds input', () => { - expect(1697013935000000).toEqual(convertToMicroseconds('1697013935')); + expect(convertToMicroseconds('1697013935')).toEqual(1697013935000000); }); it('unix miliseconds input', () => { - expect(1697013935000000).toEqual(convertToMicroseconds('1697013935000')); + expect(convertToMicroseconds('1697013935000')).toEqual(1697013935000000); }); });