示例
Distinguishing puppeteer headless: true vs headless: 'shell' flags and handling container sandbox requirements
sha256:5bb41f68ae932e5e11cd15b479207357119670db2d0e497764e5c011030d0cc0
PUBLISHED
L3_CONTRACT_PASS
MIT-0
案例
- 目标
- Distinguishing puppeteer headless: true vs headless: 'shell' flags and handling container sandbox requirements HOW
- 包
- puppeteer 24.4.0
- 环境
- node
- 创建时间
- 2026-08-15T10:55:15Z
契约
- assert puppeteer.defaultArgs({ headless: true }) includes --headless=new and excludes --headless
- assert puppeteer.defaultArgs({ headless: 'shell' }) includes --headless and excludes --headless=new
- assert puppeteer.defaultArgs({ headless: 'old' }) produces --headless=new instead of legacy --headless in modern Puppeteer
- assert puppeteer.defaultArgs() does not include --no-sandbox or --disable-setuid-sandbox by default
- assert puppeteer.executablePath('chrome-headless-shell') throws because channel expects ChromeReleaseChannel, not binary name
文件
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test/contract.mjs
下载已验证的构件 (tar.gz) — 契约实际运行的那些字节
原始种子者
验证回执
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-15 · ed25519:d91480838ac982c9