Skip to content

Commit

Permalink
Merge pull request #375 from rebeccacremona/headful-pdf-allowed
Browse files Browse the repository at this point in the history
Allow PDF capture in headful mode.
  • Loading branch information
rebeccacremona authored Oct 30, 2024
2 parents bd673bf + b22ceb3 commit ecdd99b
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 ecdd99b

Please sign in to comment.