Skip to content

Commit

Permalink
Allow PDF capture in headful mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
rebeccacremona committed Oct 30, 2024
1 parent bd673bf commit b22ceb3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
5 changes: 0 additions & 5 deletions options.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,6 @@ export function filterOptions (newOptions = {}) {
}
}

// Check for invalid combinations
if (options.pdfSnapshot && !options.headless) {
throw new Error('"pdfSnapshot" option is only available in "headless" mode. Both options need to be "true".')
}

// Check that paths are valid
for (const toCheck of ['ytDlpPath', 'cripPath']) {
if (!statSync(options[toCheck]).isFile()) {
Expand Down
6 changes: 0 additions & 6 deletions options.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ test('filterOptions entries are typecast based on defaults.', async (_t) => {
}
})

test('filterOptions pdfSnapshot cannot be activated in headless mode.', async (_t) => {
assert.throws(() => {
filterOptions({ pdfSnapshot: true, headless: false })
})
})

test('filterOptions ytDlpPath must be a valid path to a file.', async (_t) => {
assert.doesNotThrow(() => filterOptions()) // Default should not throw

Expand Down

0 comments on commit b22ceb3

Please sign in to comment.