How to prevent tests from running in the beforeAll block in jasmine?

Before all my tests (running in jasmine under the protractor), I have to log in to my system, and if the login fails, I should not run any test. But even when I use proccess.exit (which is the node function to stop the program), the tests are still running and everything fails.

 beforeAll(function(done){ mainPage.resize(); loginPage.login(env.regularUser).then(function(){ mainPage.navigate(); mainPage.waitLoading(); done(); }, function(){ process.exit(1); }); }); 

How to prevent tests from running in a beforeAll block?

+8
jasmine protractor
source share
1 answer

If I understand correctly, is this the same or a related problem:

In other words, this is what the test structure should have (in this case, jasmine ). This is currently an open function request.

Use the jasmine-bail-fast third jasmine-bail-fast party package as the current workaround.

+2
source share

All Articles