![]() To define a custom path, use the JEST_PUPPETEER_CONFIG environment variable.Įnsure that the exported configuration is either a config object or a Promise that returns a config object. jest-puppeteerrc.cjs,, or file that exports an object using module.exports.īy default, the configuration is searched for at the root of the project. jest-puppeteerrc file in either JSON or YAML format. Once you make the above configuration in your file, Puppeteer Firefox is ready to execute the tests. First, we must install it as a dependency: npm i jest-puppeteer And now we must extend our jest configuration. This isnt a particularly hard job to do, as there is a great package named jest-puppeteer that comes to our aid. A "jest-puppeteer" key in your package.json file. jest-puppeteer Now, we need to make puppeteer play nicely with jest.Start using jest-environment-puppeteer in your project by running npm i jest-environment-puppeteer. ![]() Jest Puppeteer employs cosmiconfig for configuration file support, allowing you to configure Jest Puppeteer in various ways (listed in order of precedence): Latest version: 8.0.3, last published: 6 hours ago. ![]() Now, your custom globalSetup and globalTeardown will be executed once before and after all test suites, respectively. ![]()
0 Comments
Leave a Reply. |