puppeteerにはSSL証明書のエラーを無視するオプション(ignoreHTTPSErrors: true)があります。jest-puppeteerを介して動作させている場合にオプションを設定する方法を調べました。
jest-puppeteer.config.jsを作成してください。
jest-puppeteer.config.js
module.exports = {
launch: {
ignoreHTTPSErrors: true
}
}
参照
- jest-puppetterのリファレンス https://github.com/smooth-code/jest-puppeteer#configure-puppeteer
- puppeteerのリファレンス https://github.com/puppeteer/puppeteer/blob/main/docs/api.md#puppeteerlaunchoptions