Skip to content

Proposal: pass config to globalSetup and globalTeardown #5957

@gregberge

Description

@gregberge

I am the maintainer of Jest Puppeteer project and I would like to suggest a new feature.

When I started Jest Puppeteer I wanted to make it as simple as possible. For this purpose, I wanted to be able to configure it only using Jest config. I found testEnvironmentOptions, it looked like the exact use case for me.

Jest Puppeteer needs globalSetup and globalTeardown, but these two methods do not have access to Jest config and by the way to testEnvironmentOptions. This is the reason why I introduced jest-puppeteer.config.js.

Today people are complaining about that additional config.

This was the context, now the request:

Could you pass config to globalSetup and globalTeardown? I think it is as simple as modifying this line.

Thanks for this amazing library!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions