Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
Build: Run phantomjs tests using karma (fixes eslint#6128) (eslint#6178)
Browse files Browse the repository at this point in the history
  • Loading branch information
alberto authored and ilyavolodin committed May 15, 2016
1 parent 51e05af commit 842ab2e
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile.js
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ target.test = function() {

target.browserify();

lastReturn = nodeCLI.exec("mocha-phantomjs", "-R dot", "tests/tests.htm");
lastReturn = nodeCLI.exec("karma", "start karma.conf.js");
if (lastReturn.code !== 0) {
errors++;
}
Expand Down
1 change: 0 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ version: "{build}"
environment:
matrix:
- nodejs_version: 4
PHANTOMJS_CDNURL: http://cnpmjs.org/downloads

install:
# Get the latest stable version of Node.js or io.js
Expand Down
75 changes: 75 additions & 0 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
"use strict";

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: ["mocha"],


// list of files / patterns to load in the browser
files: [
"node_modules/mocha/mocha.js",
"node_modules/chai/chai.js",
"node_modules/sinon/pkg/sinon.js",
"build/eslint.js",
"tests/lib/eslint.js"
],


// list of files to exclude
exclude: [
],


// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
},


// test results reporter to use
// possible values: "dots", "progress"
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ["mocha"],

mochaReporter: {
output: "minimal"
},

// web server port
port: 9876,


// enable / disable colors in the output (reporters and logs)
colors: true,


// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,


// enable / disable watching file and executing tests whenever any file changes
autoWatch: false,


// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ["PhantomJS"],


// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: true,

// Concurrency level
// how many browser should be started simultaneous
concurrency: Infinity
});
};
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,17 @@
"gh-got": "^2.2.0",
"istanbul": "^0.4.0",
"jsdoc": "^3.3.0-beta1",
"karma": "^0.13.22",
"karma-mocha": "^1.0.1",
"karma-mocha-reporter": "^2.0.3",
"karma-phantomjs-launcher": "^1.0.0",
"leche": "^2.1.1",
"linefix": "^0.1.1",
"load-perf": "^0.2.0",
"markdownlint": "^0.1.0",
"mocha": "^2.4.5",
"mocha-phantomjs": "4.0.1",
"npm-license": "^0.3.2",
"phantomjs-polyfill": "0.0.1",
"phantomjs-prebuilt": "^2.1.7",
"proxyquire": ">=1.0.0 <1.7.5",
"semver": "^5.0.3",
"shelljs-nodecli": "~0.1.0",
Expand Down

0 comments on commit 842ab2e

Please sign in to comment.