Travis-CI构建 - PhantomJS错误阻止运行QUnit测试

时间:2014-11-13 17:32:09

标签: github phantomjs qunit travis-ci

我有一个包含简单js函数和QUnit测试的存储库。我尝试使用grunt任务将其与Travis-CI集成。一切都在本地工作正常,但PhantomJS在构建过程中抛出一个错误,阻止我的测试运行。

生成: https://travis-ci.org/DaveKingsnorth/ciSandbox/builds/40909225

回购: https://github.com/DaveKingsnorth/ciSandbox

//.travis.yaml

language: node_js
node_js:
  - "0.11"
before_install: npm install -g grunt-cli
install: npm install

// Gruntfile.js

module.exports = function(grunt) {

  grunt.initConfig({
    pkg: '<json:package.json>',
    qunit: {
      src: ['test/**/*.html']
    }
  });

  grunt.loadNpmTasks('grunt-contrib-qunit');

  grunt.registerTask('test', ['qunit']);
  grunt.registerTask('default', 'qunit');

};

错误: 测试test / index.html PhantomJS抛出错误:ERROR

  
    

/ home / travis / build / DaveKingsnorth / ciSandbox / node_modules / grunt-contrib-qunit / node_modules / grunt-lib-phantomjs / node_modules / phantomjs / lib / phantom / bin / phantomjs:4:/ home / travis / build / DaveKingsnorth / ciSandbox / node_modules / grunt-contrib-qunit / node_modules / grunt-lib-phantomjs / node_modules / phantomjs / lib / phantom / bin / phantomjs:语法错误:未终止的引用字符串0 ['/ home / travis / build / DaveKingsnorth / ciSandbox / node_modules / grunt-contrib-qunit / node_modules / grunt-lib-phantomjs / node_modules / phantomjs / lib / phantom / bin / phantomjs:4:/ home / travis / build / DaveKingsnorth / ciSandbox / node_modules / grunt-contrib- qunit / node_modules / grunt-lib-phantomjs / node_modules / phantomjs / lib / phantom / bin / phantomjs:语法错误:未终止的引用字符串']     警告:PhantomJS意外退出并退出代码2.使用--force继续。     因警告而中止。     命令“npm test”退出0。     完成。你的构建退出0。

  

0 个答案:

没有答案