错误:TS2304:找不到名称“ t”。在运行角度项目时

时间:2019-07-11 11:24:21

标签: javascript angular typescript webpack

enter image description here

我使用https://www.npmjs.com/package/gentest生成了一些规格文件 而且我能够运行测试而不会出现任何错误。就在我为应用提供服务时,我得到了这些。

webpack-dev-server -d --progress --colors --inline --config configs/webpackConfig/webpack.local.js --port 3000

base.service.spec.ts

import { async } from '@angular/core/testing';
import {BaseService} from './base.service';

describe('BaseService', () => {
  let service;

  const httpClient: any = {
    // mock properties here 
  }

  const loggerService: any = {
    // mock properties here 
  }

  beforeEach(() => {
    service = new BaseService(httpClient,loggerService);
  });

  it('should run #postData()', async () => {
    // const result = postData(url, data, headers, apimKey);
  });

  it('should run #getData()', async () => {
    // const result = getData(url, headers, apimKey);
  });

  it('should run #deleteData()', async () => {
    // const result = deleteData(url, headers);
  });

  it('should run #handleError()', async () => {
    // const result = handleError(operation, result);
  });

  it('should run #postMethod()', async () => {
    // const result = postMethod(url, data, headers);
  });

});

0 个答案:

没有答案