AngularJS测试例 [英] AngularJS Test Example
问题描述
我不知道为什么,但我发现它真的很难让我的头周围设置使用AngularJS一个JavaScript测试。
I don't know why but I'm finding it really difficult to get my head around setting up a JavaScript test using AngularJS.
我有我的app.js,controller.js再加上其他的一些文件阿贾克斯,仓储服务,过滤器等我的应用程序工作正常,但我想学习如何做E2E和单元测试。
I have my app.js, controller.js plus a number of other files for Ajax, Storage services, filters etc. My app works fine but I want to learn how to do E2E and unit testing.
我想我需要创建一个运行我的测试中一个独立的HTML页面,但我不知道,我也不能确定我可能需要额外的哪些JavaScript文件/库。
I think I need to create a standalone HTML page that runs my tests, but I'm not sure, I'm also not sure which extra JavaScript files/libraries I might need.
有一个AngularJS测试的例子,我可以用它来获得初始设置?
Is there an AngularJS test example I could use to get the initial set-up?
的理想情况下,我想运行JS测试中,我从Visual Studio 2012中创建......但是这是一个不错的!的
推荐答案
我建议你看看角种子工程。
它具有端到端的测试已经设置。
https://github.com/angular/angular-seed
I recomend you to look at angular-seed project. It has e2e test already setup. https://github.com/angular/angular-seed
这篇关于AngularJS测试例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!