大佬教程收集整理的这篇文章主要介绍了beforeEach在angularjs / requirejs场景中没有通过Karma / Jasmine调用,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
@H_301_7@
define(['angmock','someMore'],function () { describe('myController',function () { beforeEach(function () { console.log("Entry - Initializing modules..."); module('module1'); module('module2'); console.log("Exit - Initializing modules..."); }); var scope,controller; beforeEach(inject(function ($rootScope,$controller) { console.log("Entry - CreaTing scope..."); scope = $rootScope.$new(); controller = $controller('myController',{ $scope: scope }); console.log("Exit - CreaTing scope..."); })); it('should test something',function () { console.log("Entry - Test A"); scope.myImportantAssignment = variablename; ... console.log("Exit - Test A"); }); ...@H_301_7@在构建服务器日志中,我有时可以阅读:
@H_301_7@
@H_301_7@在控制台上我可以读到:
@H_301_7@>日志:’进入 – 初始化模块……’
>日志:’退出 – 初始化模块……’
>日志:’进入 – 测试A’
@H_301_7@>在每个1之前
>在每个2之前
>它
以上是大佬教程为你收集整理的beforeEach在angularjs / requirejs场景中没有通过Karma / Jasmine调用全部内容,希望文章能够帮你解决beforeEach在angularjs / requirejs场景中没有通过Karma / Jasmine调用所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。