I’m trying to exit the process after the unit jest testing is finished,
at the same time, I’m setting a token value from the first test to authorize all the other tests
all tests passed except the login in one
and still, the jest process is still running on the terminal.
that’s the first test where I set the token after the test
test("should respond with a 200 status code", async (done) => {
response = await request(app)
.post("/login")
.send({
email: "[email protected]",
password: "testtest",
})
.expect(200);
token = response.header.token;
done();
});
The goal is to quit the process after the async process on jest