Difference between JASMINE_ADAPTER and ANGULAR_SCENARIO_ADAPTER in karma

I want to know what is the difference between JASMINE_ADAPTER and ANGULAR_SCENARIO_ADAPTER?

Because I use yoman with angular, and I have two karma configuration files, one with JASMINE_ADAPTER and the other with ANGULAR_SCENARIO_ADAPTER.

Thank you for your responses.

Tom

+4
source share
1 answer

Jasmine and Angular Script are two different things. Angular Script is just built to look like Jasmine's test code. They both use the describe (), it () functions and have similar "frame" styles.

The main difference is that Jasmine is more focused on Javascript testing, and Angular Script is more DOM-oriented.

For example, Angular Script can be used to check if your AngularJs code is creating DOM objects correctly, and Jasmine checks Javascript itself.

The big difference between the two is that Angular Script allows you to open a β€œbrowser” (like a frame) and load the page completely, while Jasmine just loads the Javascript.

browser().navigateTo("http://www.stackoverflow.com"); 

can only be run in an angular script.

Similarly, Angular Script can manage DOM objects. You can fill out forms and select objects, for example:

 input("username").enter("my_username"); input("password").enter("my_password"); element(".submitButton").click(); 

I highly recommend you take a look: http://docs.angularjs.org/guide/dev_guide.e2e-testing and http://pivotal.imtqy.com/jasmine/

+7
source

Source: https://habr.com/ru/post/1483833/


All Articles