Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow PDF capture in headful mode. #375

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading