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 have a suite of tests that I am interested in running every 24H, but not earlier than that (unless the last run failed).
The reason for that is that they are expensive (both computationally and monetarily as they access paying services).
My current strategy is hacky:
On the last test of the suite, store the date on localStorage with import.meta.filename as the key
At the beginning of the test, check the date and if less than 24, set const ignore to true
Add { ignore: ignore } to all tests so that they are ignored if 24H have not gone by
Not forget to add --fail-fast (so that the date is NOT stored on failure)
As you can see, many things can go wrong with this approach.
I know that I could set a scheduler to run it every 24H or something like that, but I do not want to reach for "cron" oriented solutions.
My ask is to have access to the current suite of tests. How many have passed? How many have failed? Having read-only access to this info in user land could enable me to not depend on --fail-fast. And it would be nice to have a beforeAllafterAll without the additional structure of building steps.
Cheers.
The text was updated successfully, but these errors were encountered:
I have a suite of tests that I am interested in running every 24H, but not earlier than that (unless the last run failed).
The reason for that is that they are expensive (both computationally and monetarily as they access paying services).
My current strategy is hacky:
localStorage
withimport.meta.filename
as the keyignore
totrue
{ ignore: ignore }
to all tests so that they are ignored if 24H have not gone by--fail-fast
(so that the date is NOT stored on failure)As you can see, many things can go wrong with this approach.
I know that I could set a scheduler to run it every 24H or something like that, but I do not want to reach for "cron" oriented solutions.
My ask is to have access to the current suite of tests. How many have passed? How many have failed? Having read-only access to this info in user land could enable me to not depend on
--fail-fast
. And it would be nice to have abeforeAll
afterAll
without the additional structure of building steps.Cheers.
The text was updated successfully, but these errors were encountered: