mardi 28 janvier 2020

How to run jest test inside other test block?

For example I have 2 test, how can I test one depend on another one? Sometimes, we want to have some E2E test, which could reproduce same test steps.

What I think right now is using separate function for testing, but if there is a quick way to run other test with one statement which would be great.

test('test1', () => {
})
test('test2', () => {
  // run test1 here
})

Aucun commentaire:

Enregistrer un commentaire