forked from bootboxjs/bootbox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
provide alternate vendor files in different karma configuration files
- Loading branch information
1 parent
13abd6a
commit 9e7cec1
Showing
4 changed files
with
66 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,51 @@ | ||
module.exports = function(config) { | ||
|
||
return config.set({ | ||
basePath: "", | ||
frameworks: ["mocha", "chai"], | ||
files: [ | ||
"node_modules/sinon/lib/sinon.js", | ||
"node_modules/sinon/lib/sinon/spy.js", | ||
"node_modules/sinon/lib/sinon/stub.js", | ||
"node_modules/sinon-chai/lib/sinon-chai.js", | ||
"tests/vendor/jquery-1.8.3.min.js", | ||
"tests/vendor/bootstrap-3.0.0.min.js", | ||
"bootbox.js", | ||
"tests/**/*.test.coffee", | ||
"tests/**/*.test.js" | ||
], | ||
exclude: [], | ||
preprocessors: { | ||
"**/*.coffee": ["coffee"], | ||
"bootbox.js": ["coverage"] | ||
}, | ||
reporters: ["dots", "coverage", "junit"], | ||
port: 9876, | ||
colors: true, | ||
logLevel: config.LOG_INFO, | ||
autoWatch: true, | ||
browsers: ["PhantomJS"], | ||
captureTimeout: 60000, | ||
singleRun: false, | ||
|
||
coverageReporter: { | ||
type: "cobertura", | ||
dir: "tests/coverage" | ||
}, | ||
|
||
junitReporter: { | ||
outputFile: "tests/reports/results.xml" | ||
} | ||
}); | ||
module.exports = function(params) { | ||
|
||
"use strict"; | ||
|
||
console.log("Vendor files: " + params.vendor.join(", ")); | ||
|
||
return function(config) { | ||
|
||
return config.set({ | ||
basePath: "", | ||
frameworks: ["mocha", "chai"], | ||
files: Array.prototype.concat([ | ||
"node_modules/sinon/lib/sinon.js", | ||
"node_modules/sinon/lib/sinon/spy.js", | ||
"node_modules/sinon/lib/sinon/stub.js", | ||
"node_modules/sinon-chai/lib/sinon-chai.js"], | ||
|
||
params.vendor, | ||
|
||
params.src || "bootbox.js", | ||
|
||
["tests/**/*.test.coffee", | ||
"tests/**/*.test.js"] | ||
), | ||
exclude: [], | ||
preprocessors: { | ||
"**/*.coffee": ["coffee"], | ||
"bootbox.js": ["coverage"] | ||
}, | ||
reporters: ["dots", "coverage", "junit"], | ||
port: 9876, | ||
colors: true, | ||
logLevel: config.LOG_INFO, | ||
autoWatch: true, | ||
browsers: ["PhantomJS"], | ||
captureTimeout: 60000, | ||
singleRun: true, | ||
|
||
coverageReporter: { | ||
type: "cobertura", | ||
dir: "tests/coverage" | ||
}, | ||
|
||
junitReporter: { | ||
outputFile: "tests/reports/results.xml" | ||
} | ||
}); | ||
|
||
}; | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
var baseConfig = require("./karma-base.conf"); | ||
|
||
module.exports = baseConfig({ | ||
vendor: [ | ||
"tests/vendor/jquery-1.10.2.min.js", | ||
"tests/vendor/bootstrap-3.0.0.min.js" | ||
] | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
var baseConfig = require("./karma-base.conf"); | ||
|
||
module.exports = baseConfig({ | ||
vendor: [ | ||
"tests/vendor/jquery-1.8.3.min.js", | ||
"tests/vendor/bootstrap-3.0.0.min.js" | ||
] | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters