Skip to content

Commit

Permalink
chore: Update test time
Browse files Browse the repository at this point in the history
  • Loading branch information
m-arrieta-r committed Mar 30, 2024
1 parent 582a3f8 commit ae532fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions __tests__/tests/ATV/__snapshots__/index.test.ts.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Create Document (Invoice) should create document and generate a correct command 1`] = `"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48RmFjdHVyYUVsZWN0cm9uaWNhIHhtbG5zPSJodHRwczovL2Nkbi5jb21wcm9iYW50ZXNlbGVjdHJvbmljb3MuZ28uY3IveG1sLXNjaGVtYXMvdjQuMy9mYWN0dXJhRWxlY3Ryb25pY2EiIHhtbG5zOmRzPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwLzA5L3htbGRzaWcjIiB4bWxuczp4c2Q9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hIiB4bWxuczp4c2k9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4c2k6c2NoZW1hTG9jYXRpb249Imh0dHBzOi8vY2RuLmNvbXByb2JhbnRlc2VsZWN0cm9uaWNvcy5nby5jci94bWwtc2NoZW1hcy92NC4zL2ZhY3R1cmFFbGVjdHJvbmljYSBodHRwczovL3d3dy5oYWNpZW5kYS5nby5jci9BVFYvQ29tcHJvYmFudGVFbGVjdHJvbmljby9kb2NzL2VzcXVlbWFzLzIwMTYvdjQuMy9GYWN0dXJhRWxlY3Ryb25pY2FfVjQuMy54c2QiPjxDbGF2ZT41MDYwMTA0MjQwMDAyMDY5MjAxNDIwMDEwMDAwMTAxMDAwMDAwMDAwMjEwMDAwMDAwMTwvQ2xhdmU+PENvZGlnb0FjdGl2aWRhZD4wMDAwMDQ8L0NvZGlnb0FjdGl2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L0ltcHVlc3RvPjxNb250b1RvdGFsTGluZWE+MTEuMzwvTW9udG9Ub3RhbExpbmVhPjwvTGluZWFEZXRhbGxlPjwvRGV0YWxsZVNlcnZpY2lvPjxSZXN1bWVuRmFjdHVyYT48Q29kaWdvVGlwb01vbmVkYT48Q29kaWdvTW9uZWRhPkNSQzwvQ29kaWdvTW9uZWRhPjxUaXBvQ2FtYmlvPjU4NS42OTwvVGlwb0NhbWJpbz48L0NvZGlnb1RpcG9Nb25lZGE+PFRvdGFsU2VydkdyYXZhZG9zPjA8L1RvdGFsU2VydkdyYXZhZG9zPjxUb3RhbFNlcnZFeGVudG9zPjA8L1RvdGFsU2VydkV4ZW50b3M+PFRvdGFsTWVyY2FuY2lhc0dyYXZhZGFzPjEwPC9Ub3RhbE1lcmNhbmNpYXNHcmF2YWRhcz48VG90YWxNZXJjYW5jaWFzRXhlbnRhcz4wPC9Ub3RhbE1lcmNhbmNpYXNFeGVudGFzPjxUb3RhbEdyYXZhZG8+MTA8L1RvdGFsR3JhdmFkbz48VG90YWxFeGVudG8+MDwvVG90YWxFeGVudG8+PFRvdGFsRXhvbmVyYWRvPjA8L1RvdGFsRXhvbmVyYWRvPjxUb3RhbFZlbnRhPjEwPC9Ub3RhbFZlbnRhPjxUb3RhbERlc2N1ZW50b3M+MDwvVG90YWxEZXNjdWVudG9zPjxUb3RhbFZlbnRhTmV0YT4xMDwvVG90YWxWZW50YU5ldGE+PFRvdGFsSW1wdWVzdG8+MS4zPC9Ub3RhbEltcHVlc3RvPjxUb3RhbENvbXByb2JhbnRlPjExLjM8L1RvdGFsQ29tcHJvYmFudGU+PC9SZXN1bWVuRmFjdHVyYT48L0ZhY3R1cmFFbGVjdHJvbmljYT4="`;
4 changes: 2 additions & 2 deletions __tests__/tests/ATV/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const expectXml = fs.readFileSync('__tests__/stubs/commonExpectedXml.xml', 'utf-
describe('Create Document (Invoice)', () => {
beforeAll(() => {
jest.useFakeTimers();
jest.setSystemTime(new Date(2024, 3, 1));
jest.setSystemTime(new Date(2024, 3, 1, 0, 0, 0, 0));
})

it('should create document and generate a correct command', async () => {
Expand Down Expand Up @@ -44,7 +44,7 @@ describe('Create Document (Invoice)', () => {
token: 'fake-token',
signatureOptions: undefined
})
expect(createdDoc.command.data.comprobanteXml).toBeDefined()
expect(createdDoc.command.data.comprobanteXml).toMatchSnapshot()
expect(createdDoc.extraData.xml).toEqualXML(expectXml)
})
})

0 comments on commit ae532fa

Please sign in to comment.