Skip to content

Commit

Permalink
test(chromium): update unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cherfia committed Nov 18, 2024
1 parent 9dd5395 commit d0dc409
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
10 changes: 8 additions & 2 deletions src/chromium/utils/tests/converter.utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -439,9 +439,10 @@ describe('ConverterUtils', () => {
downloadFrom: {
url: 'http://example.com',
extraHttpHeaders: { 'Content-Type': 'application/json' }
}
},
generateDocumentOutline: true
});
expect(mockFormDataAppend).toHaveBeenCalledTimes(18);
expect(mockFormDataAppend).toHaveBeenCalledTimes(19);
expect(data.append).toHaveBeenNthCalledWith(
1,
'pdfa',
Expand Down Expand Up @@ -533,6 +534,11 @@ describe('ConverterUtils', () => {
extraHttpHeaders: { 'Content-Type': 'application/json' }
})
);
expect(data.append).toHaveBeenNthCalledWith(
19,
'generateDocumentOutline',
'true'
);
});
});
});
Expand Down
8 changes: 7 additions & 1 deletion src/chromium/utils/tests/screenshot.utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ describe('ScreenshotUtils', () => {
failOnResourceLoadingFailed: true,
skipNetworkIdleEvent: false,
failOnConsoleExceptions: true,
generateDocumentOutline: true,
properties: {
format: 'jpeg',
quality: 50
Expand All @@ -268,7 +269,7 @@ describe('ScreenshotUtils', () => {
extraHttpHeaders: { 'Content-Type': 'application/json' }
}
});
expect(mockFormDataAppend).toHaveBeenCalledTimes(13);
expect(mockFormDataAppend).toHaveBeenCalledTimes(14);
expect(data.append).toHaveBeenNthCalledWith(
1,
'emulatedMediaType',
Expand Down Expand Up @@ -334,6 +335,11 @@ describe('ScreenshotUtils', () => {
extraHttpHeaders: { 'Content-Type': 'application/json' }
})
);
expect(data.append).toHaveBeenNthCalledWith(
14,
'generateDocumentOutline',
'true'
);
});
});
});
Expand Down

0 comments on commit d0dc409

Please sign in to comment.