gpt4 book ai didi

AngularJS - Karma (e2e) : Executed 0 of 0 ERROR

转载 作者:行者123 更新时间:2023-12-04 13:11:35 25 4
gpt4 key购买 nike

我遇到了一段时间无法解决的问题,并且非常沮丧,因为我不知道我做错了什么。 :) 任何帮助深表感谢。我也在我的应用程序中使用 requirejs。这基本上就是我想要构建的; https://github.com/Cengizism/base

当我尝试开始我的 e2e 测试时,我在我的控制台上看到了这个信息;

INFO [karma]: Karma v0.10.0 server started at http://localhost:8080/_karma_/
INFO [launcher]: Starting browser Chrome
INFO [Chrome 28.0.1500 (Mac OS X 10.8.4)]: Connected on socket id n-0AVRliCogs2nWBfgDz
Chrome 28.0.1500 (Mac OS X 10.8.4): Executed 0 of 0 ERROR (0.208 secs / 0 secs)

我的配置文件是这样的;
module.exports = function(karma) {
'use strict';

karma.set({
frameworks: ['jasmine', 'ng-scenario'],

files: [
'app/vendors/angular-scenario/angular-scenario.js',
'test/e2e/*.js'
],

basePath: '',

exclude: [],

reporters: ['progress'],

port: 8080,

runnerPort: 9100,

colors: true,

logLevel: karma.LOG_INFO,

autoWatch: true,

browsers: ['Chrome'],

captureTimeout: 5000,

singleRun: false,

proxies: {
'/': 'http://localhost:9000/'
},

urlRoot: '/_karma_/',

plugins: [
'karma-jasmine',
'karma-ng-scenario',
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-phantomjs-launcher'
]
});
};

最后是规范文件;
describe('Simple E2e Test', function()
{
it('Should open the front page and check', function()
{
browser().navigateTo('/#/partial1');

sleep(1);

expect(element('#test').html()).toEqual('Hi testUser1');
});
});

最佳答案

也许这可以帮助你:

To fix it, the following line should be included in karma.conf.js

exclude: ['app/lib/angular/angular-scenario.js'],


来源: https://github.com/angular/angular-phonecat/issues/71

关于AngularJS - Karma (e2e) : Executed 0 of 0 ERROR,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18102390/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com