Skip to content

Commit

Permalink
fix: add missing test
Browse files Browse the repository at this point in the history
  • Loading branch information
diego-ilovepdf committed May 31, 2024
1 parent 75e7bbd commit e9b3014
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/ILovePDFApi.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@ describe('ILovePDFApi', () => {
await task.addFile(file);
});

it('gets the remaining files', async () => {
const task = api.newTask('merge');

await task.start()

// Be careful with this test. In case of being an admin, `remainingFiles`
// is `undefined` due to they have no limits.
expect(typeof task.remainingFiles === 'number').toBeTruthy();
});

it('does not get the pdfinfo', async () => {
const task = api.newTask('merge');

Expand Down Expand Up @@ -89,8 +99,6 @@ describe('ILovePDFApi', () => {

const file = await task.addFile('https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf', { info: true });

// Be careful with this test. In case of being an admin, `remainingFiles`
// is `undefined` due to they have no limits.
expect(file.info).toBeDefined();
});

Expand Down

0 comments on commit e9b3014

Please sign in to comment.