这个angular2单元测试设置有什么问题?

时间:2016-08-30 13:58:15

标签: angular

import { MockBackend } from '@angular/http/testing';
import { Http, ConnectionBackend, BaseRequestOptions, Response, ResponseOptions } from '@angular/http';
import { Calculator } from '../classes/calculator';
import { tick, fakeAsync } from '@angular/core/testing/fake_async';
import { inject, TestBed, getTestBed } from '@angular/core/testing/test_bed';

describe('SearchService', () => {
  beforeEach(() => {
    TestBed.configureTestingModule({
      providers: [
        {provide: Calculator, useClass: Calculator}
      ]
    });
  });
});

它会在'describe'和'beforeEach'上抛出错误,说它找不到名字。我已经读过你不再需要在RC5中输入这些内容了,但还是有些问题。我已经安装了最新的茉莉和业力包。

0 个答案:

没有答案