昨日、同じspec-test.jsとconfig.jsを実行していて、うまくいきました。分度器設定ファイルでエラーが発生する
Using the selenium server at http://localhost:4444/wd/hub
[launcher] Running 1 instances of WebDriver
[launcher] Error: SyntaxError: Unexpected identifier
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/Users/FOLDERPATH/specs/spec-test.js:2:13)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
[launcher] Process exited with error code 100
私は分度器3.2.2、ノード4.4.3
任意のアイデアなぜテストを使用しています:
今日はこれが2 3アウトマシン上で起こっている、しようと、以下のエラーを得ました実行されていません。
PS:フォーラムで質問するためにコードを少し変更したので、ファイル名の不一致/タイプミスを無視してください。私は以下のコードを実行しようとしましたが、同じエラーが発生しました。
config.jsの:
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['specs/spec-test.js'],
capabilities: {
browserName: 'chrome',
chromeOptions: {
debuggerAddress: '127.0.0.1:9000'
}
},
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 700000,
isVerbose: true
}
};
スペック-test.js
var fs = require('fs');
var panel = require('../pageObjects/file1.js');
var panelHelper = require('../pageObjects/file2.js');
var panelApp = require('../pageObjects/file3.js');
describe("Just print Hello world", function() {
it('test 1', function() {
console.log("Hello World!");
});
});
上記config.jsとspec-test.jsが役に立つかもしれません。 –
@dawson私の古い質問で編集を見つけてください。 – FindABug