From f47872ba81e0a75ea6993c4a84c4c5f8408d2d1c Mon Sep 17 00:00:00 2001 From: Roko Date: Sat, 16 Mar 2024 13:19:50 +0100 Subject: [PATCH] test: fix dates --- src/__mocks__/invoice.ts | 2 +- src/__tests__/__snapshots__/fiscalization.test.ts.snap | 6 +++--- src/__tests__/fiscalization.test.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/__mocks__/invoice.ts b/src/__mocks__/invoice.ts index 728058d..bb7aefe 100644 --- a/src/__mocks__/invoice.ts +++ b/src/__mocks__/invoice.ts @@ -8,7 +8,7 @@ export const mockInvoice: Required = { number: 1, paymentDevice: '1', }, - dateTime: new Date('2014-07-15T18:00:00.000Z'), + dateTime: new Date('2014-07-15T18:00:00'), hasPDV: true, items: { otherTaxRate: [ diff --git a/src/__tests__/__snapshots__/fiscalization.test.ts.snap b/src/__tests__/__snapshots__/fiscalization.test.ts.snap index a330720..bb210b2 100644 --- a/src/__tests__/__snapshots__/fiscalization.test.ts.snap +++ b/src/__tests__/__snapshots__/fiscalization.test.ts.snap @@ -15,7 +15,7 @@ exports[`Fiscalization XML should match with full data 1`] = ` 1 ODV1 - 15.07.2014T20:00:00 + 15.07.2014T18:00:00 32.00 5.10 23.50 @@ -70,9 +70,9 @@ exports[`Fiscalization XML should match with full data 1`] = ` true - 23c893f445155cdbc23aafd16ae06662 + 2d4398c29f18c1c2fdc3b80b0c166e2e - VnqTZ76B8cpF1/uoMUrAA8T3CuA=CqmmtYkJGY939NBYY51ihZysaVUN8ZT9ffgTLTVm1S3f35YQo2ddN70HiHRLdPQkiLIEwr0CCVOku1VEEQuvnS+qEWtlQ3iUzBmnVFxg9BEPP8uNAuSoMDZK5llU2KZk4eUc/0xobK/qwA5Z6ywXYrIgemPp2T/L6QuZGgE8cRc= + Q1Y0SgKoTQtZnJOz/+pZm01fKWo=PIOjJYHm2y6gGvOplnK+N7U6fevwFJ7GSePubGzE9lvjqoVMCn3Wm0p370zDzfGDdpm2b2r5w88VNiDmte0z8hcyIBR5gIAvtkxazk8UthegbZ1T0AJKCXrbGtwwLvT6OTtc/Q7qIlRQEKIExYuu5YQS5PldhKEtnsIXyfYkXyk= MIICczCCAdygAwIBAgIEAPymiTANBgkqhkiG9w0BAQUFADBrMQswCQYDVQQGEwJV UzEQMA4GA1UECBMHTG90aGlhbjESMBAGA1UEBxMJRWRpbmJ1cmdoMQ0wCwYDVQQK EwRUZXN0MRgwFgYJKoZIhvcNAQkBFglmcmVkQGhvbWUxDTALBgNVBAMTBGZyZWQw diff --git a/src/__tests__/fiscalization.test.ts b/src/__tests__/fiscalization.test.ts index d5575c7..e9f249f 100644 --- a/src/__tests__/fiscalization.test.ts +++ b/src/__tests__/fiscalization.test.ts @@ -11,7 +11,7 @@ const TEST_CERTIFICATE_PASS = 'apples'; const TEST_CERTIFICATE_BUFFER = readFileSync(TEST_CERTIFICATE_PATH); jest.useFakeTimers(); -jest.setSystemTime(new Date('2021-01-12T13:05:30.000')); +jest.setSystemTime(new Date('2021-01-12T13:05:30')); describe('Fiscalization', () => { let fiscalization: Fiscalization;