我試圖讓噶Jamine的ajax.js噶 - 茉莉花:錯誤:沒有提供程序框架:茉莉花AJAX
https://github.com/IDCubed/karma-jasmine-ajax
我的人緣配置有:
module.exports = function(config) {
config.set({
...
frameworks: ['jasmine-ajax', 'jasmine'],
});
};
我的包.json有:
"devDependencies": {
"bower": "^1.4.1",
"del": "^1.1.1",
"gulp": "^3.8.11",
"gulp-concat": "^2.5.2",
"gulp-karma": "0.0.4",
"jasmine-ajax": "^3.1.0",
"jasmine-core": "^2.2.0",
"karma": "0.12.31",
"karma-chrome-launcher": "0.1.7",
"karma-cli": "0.0.4",
"karma-jasmine": "0.3.5",
"karma-jasmine-ajax": "^0.1.12",
"karma-junit-reporter": "^0.2.2",
"yargs": "^3.7.1"
}
和我的規格是這樣的:
describe("mocking ajax", function() {
describe("suite wide usage", function() {
beforeEach(function() {
jasmine.Ajax.install();
});
afterEach(function() {
jasmine.Ajax.uninstall();
});
it('does something', function() {
});
});
});
但我有此錯誤:
/node_modules/karma/node_modules/di/lib/injector.js:9
throw error('No provider for "' + name + '"!');
^
Error: No provider for "framework:jasmine-ajax"! (Resolving: framework:jasmine-ajax)
我顯然缺少一些插件什麼的......但什麼?