I need to run differents describe blocks from different files in determinate order. Also, I need pass 1 argument between this blocks, but the argument needs to keep the state with which it left the previous describes. For example, i have this:
file1.test.js
export const Test1= () => {
describe("Describe 1", () => {
test("test1", async () => {//my test1
})
test("test2", async () => {//my test2
})
describe("Describe 2", () => {
test("test3", async () => {//my test3
})
test("test4", async () => {//my test4
})
}
file2.test.js
export const Test2= () => {
describe("Describe 3", () => {
test("test5", async () => {//my test5
})
test("test6", async () => {//my test6
})
describe("Describe 4", () => {
test("test7", async () => {//my test7
})
test("test8", async () => {//my test8
})
}
I want to run the tests in the following order with this argument:
let myArgument;
Test1
Describe 1(myArgument)
Test2
Describe 3
Test1
Describe 2(myArgument)
Test2
Describe 4
I am using to run the tests: jest --runInBand