Skip to content
Advertisement

Conditional test case in jasmine

I am writing Jasmine. I want that when the response from the site is ok (site uploaded- pending 200).

Run the it’s (test cases) in spec and when the site is failed to load the site the it’s (test cases) will not run.

I check the response from site in before all function.

And now in each it that make different thing I check the condition if the response (saved in global var) is true

How can I do it in global fun like before each?

JavaScript

Advertisement

Answer

something like this in your config

JavaScript

global.response will be available in your specs

Advertisement