是否有茉莉角控制器测试发电机? [英] Is there a generator for jasmine angular controller tests?

查看:106
本文介绍了是否有茉莉角控制器测试发电机?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在寻找的东西生成样板茉莉测试的角度控制器。看来你可以拉的依赖关系为控制器并拖放到规范,节省一些打字。我想如果我有这个想法的第一人,但被震惊,我无法找到任何东西,这样做,保存不会出现一个工作项目自耕农。

I'm looking for something that generates a boilerplate jasmine test for an angular controller. It seems you could pull the dependencies for the controller out and drop them into the spec and save some typing. I would be shocked if I were the first person to have this idea but I'm unable to find anything that does this, save a yeomen project that doesn't appear to work.

推荐答案

我使用自耕农,提供的generator-angular 生成我们的脚本和放大器;试验。

I am using yeoman with generator-angular to generate our scripts & tests.


哟角:指令myDirective
哟角:服务为myService
哟角:控制器myController的

等等。

会同时生成脚本和规格的模板。我使用的业力和茉莉花。

will generate both the script and spec templates. I am using Karma and Jasmine.

您也可以编写自己的自耕农发生器。

You could also always write your own yeoman generator.

这篇关于是否有茉莉角控制器测试发电机?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆