2016-06-30 4 views
1

プロジェクトにジャスミンの入力をインストールしました。これらは現在私の "index.d.ts"ファイルにあります。しかし、テストを書くとき、expect('').toBeNaN、私は "toBe"、それ以上何も表示されません。VisualCode IntelliSenseジャスミン入力が機能していないようです

これらは私の設定ファイルです:

{ 
     "compilerOptions": { 
     "target": "es5", 
     "module": "commonjs", 
     "emitDecoratorMetadata": true, 
     "experimentalDecorators": true 
     }, 
     "filesGlob": [ 
     "**/*.ts", 
     "!node_modules/**/*" 
     ], 
     "include": [ 
     "typings/index.d.ts" 
     ], 
     "exclude": [ 
     "node_modules", 
     "typings/main", 
     "typings/main.d.ts" 
     ], 
     "compileOnSave": false, 
     "atom": { 
     "rewriteTsconfig": false 
     } 
    } 

tsconfig.json

は、これはあなたが間違ったバージョンをインストールしている場合があります私のindex.d.ts

/// <reference path="globals/jasmine-expect/index.d.ts" /> 
/// <reference path="globals/jasmine/index.d.ts" /> 
/// <reference path="globals/karma-jasmine/index.d.ts" /> 

答えて

0

です。タイピングから次のものをインストールしてみてください。

typings install dt~jasmine --global --save-dev 

この記事の執筆時点では、バージョン2.2.0がインストールされています。

関連する問題