量角器打字稿:ts案例突然出现错误,表示我无法编译为js文件运行测试

时间:2019-03-22 12:26:29

标签: javascript angular typescript automation protractor

我是量角器打字稿的新手,并且在测试文件中编译时感到头疼。

Watch the video here

如您所见,代码中有一个错误(错误TS2582):. ts测试用例中(肯定是以前没有的)。

如何解决该问题,以便可以使用tsc进行编译并成功运行测试用例?

这是代码:

ChaLoctestscript.ts:5:1 - error TS2582: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i @types/jest
` or `npm i @types/mocha`  and then add `jest` or `mocha` to the types field in your tsconfig.

5 describe('Using chain loctor',function(){
  ~~~~~~~~
ChaLoctestscript.ts:8:2 - error TS2582: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `
npm i @types/mocha`  and then add `jest` or `mocha` to the types field in your tsconfig.

8  it('Opening google page',function(){
   ~~


Found 2 errors.

0 个答案:

没有答案