我试图设置我的phantomjs测试工作虽然业力,但我无法加载phantomjs'网页'和'系统'模块虽然requirejs.
这是karma.config.js的一部分
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '.',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['requirejs'],
// list of files / patterns to load in the browser
files: [
'../ext/ext-all.js',
'test/jasmine/jasmine/jasmine.css',
'test/jasmine/jasmine/jasmine.js',
'test/jasmine/jasmine/jasmine-html.js',
'resources/webclientLogin-all.css',
'resources/webclient/webclient.css',
'app/controller/login/main.js',
'app/view/login/FormContainer.js',
'app/view/login/MustChangePasswordForm.js',
'app/view/MainView.js',
'app/Application.js',
'development.js',
'app.js',
'test/phantomjs/loginSuccess.js',
],
Run Code Online (Sandbox Code Playgroud)
这是phantomjs测试代码:
var page = require('webpage').create(), testindex = 0, loadInProgress = false;
var clientURL = "http://localhost:7001/client/";
page.onConsoleMessage = function(msg) { …Run Code Online (Sandbox Code Playgroud)