2017-02-10 111 views
0

我想單元測試jasmine-expect。然而我不斷收到錯誤:茉莉花期待不能找到笑話,茉莉花v2.x或茉莉花v1.x

jasmine-expect cannot find jest, jasmine v2.x, or jasmine v1.x

我已經安裝了最新版本的茉莉花。我錯過了什麼?

的package.json

{ 
    "name": "js", 
    "version": "1.0.0", 
    "description": "", 
    "main": "Person.js", 
    "scripts": { 
    "test": "echo \"Error: no test specified\" && exit 1" 
    }, 
    "author": "", 
    "license": "ISC", 
    "devDependencies": { 
    "add-matchers": "^0.4.0", 
    "babel-cli": "^6.22.2", 
    "babel-core": "^6.22.1", 
    "babel-loader": "^6.2.10", 
    "babel-preset-es2015": "^6.22.0", 
    "babel-preset-react": "^6.22.0", 
    "jasmine": "^2.5.3", 
    "jasmine-expect": "^3.6.0", 
    "jest": "^18.1.0", 
    "webpack": "^2.2.1" 
    }, 
    "dependencies": { 
    "deep-freeze": "0.0.1" 
    } 
} 

我的代碼:

'use strict'; 
import expect from 'jasmine-expect'; 

console.log('It is working...'); 

錯誤消息: enter image description here

+0

@therewillbecode感謝您的快速響應。我已經安裝了最新版本的笑話,但仍然得到相同的錯誤。我更新了我的package.json文件。 – Lomse

回答