Heya
Im evaluating jest-puppeteer. and so im running the example.
It runs smoothly as is. but im now trying to run the test non-headless/headfull (?) and i get stuck.
i simply added the following as found in the README.md:
module.exports = {
preset: 'jest-puppeteer',
testRegex: './*\\.test\\.js$',
launch: {
headless: false
},
browserContext: 'default',
}
this triggers a bunch of validation warnings and stil run the tests headless:
● Validation Warning:
Unknown option "launch" with value {"headless": true} was found.
This is probably a typing mistake. Fixing it will remove this message.
Configuration Documentation:
https://jestjs.io/docs/configuration.html
● Validation Warning:
Unknown option "browserContext" with value "default" was found.
This is probably a typing mistake. Fixing it will remove this message.
Configuration Documentation:
https://jestjs.io/docs/configuration.html
Im pretty new to al this, so excuse any stupidity on my part, but I thought id share my troubles.
Hello @midgethoen, you mixed the jest-puppeteer.config.js and the jest configuration. It is two separated files. You should give another look to the documentation.
@midgethoen
try this
// jest-puppeteer.config.js
module.exports = {
launch: {
headless: false
},
browserContext: 'default',
}
// jest.config.js
module.exports = {
preset: 'jest-puppeteer',
testRegex: './*\\.test\\.js$',
}
Most helpful comment
@midgethoen
try this