You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to integrate the audits in my Jest test suite as shown in the README.
I don’t want to have a fixed port for my URL: I want to be able to listen on port 0 and get the URL back and pass that to the tests.
But I don’t want to actually start and listen on a server at the “top level” of a file, because I don't want it to run unless the particular tests are selected (eg, if it.only or the like disables this part of the test file, I don't want to start a server). So listening should go in beforeAll or beforeEach or something.
But you need to give Jest the list of tests before this code runs, and the API here only gives you the list of audit tests once you already have an URL.
It would work better if the url was an argument to fn instead, or if you can pass a function returning an URL or something.
The text was updated successfully, but these errors were encountered:
# [1.8.0](v1.7.2...v1.8.0) (2022-11-21)
### Features
* **audits/server:** Support functions for the `url` option ([f4d20a9](f4d20a9)), closes [#24](#24)
I would like to integrate the audits in my Jest test suite as shown in the README.
I don’t want to have a fixed port for my URL: I want to be able to listen on port 0 and get the URL back and pass that to the tests.
But I don’t want to actually start and listen on a server at the “top level” of a file, because I don't want it to run unless the particular tests are selected (eg, if
it.only
or the like disables this part of the test file, I don't want to start a server). So listening should go in beforeAll or beforeEach or something.But you need to give Jest the list of tests before this code runs, and the API here only gives you the list of audit tests once you already have an URL.
It would work better if the url was an argument to fn instead, or if you can pass a function returning an URL or something.
The text was updated successfully, but these errors were encountered: