jeudi 31 janvier 2019

Running Puppeteer tests in order with Jest

I'm using Jest Puppeteer and I have a situation where I'd like to run my login test (which sets cookie/localStorage for the authentication) first and run the others after, however, I know that Jest doesn't work this way - as it searches the local filesystem and runs tests based on the patterns in the filename, and the order in which they run is different.

I'm not entirely sure I'm going about this the correct way as I'm relying on a test to set the the authentication session for the other tests.

Is it possible to do the above, or do I need to rethink my approach?

Aucun commentaire:

Enregistrer un commentaire