为什么需要使用茉莉花角angular?

时间:2019-09-04 21:42:41

标签: angularjs jasmine

如果我不使用以下方式加载角度模拟:

<script src="angular-mocks.js"></script>

我的Jasmine规范包含:

describe('load app', function () {
    beforeEach(module('MyApp'));

我得到一个错误:

ReferenceError: module is not defined
at <Jasmine>
at Suite.<anonymous> (spec.js:4:2)
at <Jasmine>
at spec.js:1:1

如果我加载angular-mocks.js,则看不到此错误,但是我的$ http调用被模拟了。

我想对实时数据进行测试,并且不想模拟$ http调用。

我该如何用茉莉花呢?

0 个答案:

没有答案
相关问题