Is 'repeater' in this angular tutorial a jasmine concept?

时间秒杀一切 提交于 2019-12-05 05:49:04

The repeater is not a Jasmine construct, it is AngularJS e2e scenario tester concept.

The repeater function is defined in the DSL used by the AngularJS e2e scenario runner and its definition can be seen here: https://github.com/angular/angular.js/blob/master/src/ngScenario/dsl.js#L249 The corresponding documentation is located at: http://docs.angularjs.org/guide/dev_guide.e2e-testing

It should be noted that even if AngularJS uses Jasmine syntax for its end-to-end test, those e2e tests are not Jasmine tests, they just happen to use very similar syntax. The purpose of the AngularJS ngScenario runner is to execute end-to-end tests in a browser and uses matchers are tight to the browser environment (DOM, location etc.) Jasmine is more focused on unit-tests and has matchers for JavaScript objects.

The mentioned repeater is just a way of counting DOM object given a jQuery selector and it is true that is usually used to count DOM element produced by the ngRepeat directive.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!