update karma config to work on version 0.10
This commit is contained in:
parent
1b8f5c6ece
commit
f04527b308
46
package.json
46
package.json
@ -1,23 +1,27 @@
|
||||
{
|
||||
"name": "leaflet",
|
||||
"version": "0.6.3",
|
||||
"description": "JavaScript library for mobile-friendly interactive maps",
|
||||
"devDependencies": {
|
||||
"jshint": "~2.1.10",
|
||||
"mocha": "~1.12.1",
|
||||
"happen": "~0.1.3",
|
||||
"karma": "~0.10.2",
|
||||
"uglify-js": "~2.4.0",
|
||||
"jake": "~0.6.11"
|
||||
},
|
||||
"main": "dist/leaflet.js",
|
||||
"scripts": {
|
||||
"test": "jake test",
|
||||
"prepublish": "jake"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/Leaflet/Leaflet.git"
|
||||
},
|
||||
"keywords": ["gis", "map"]
|
||||
"name": "leaflet",
|
||||
"version": "0.6.3",
|
||||
"description": "JavaScript library for mobile-friendly interactive maps",
|
||||
"devDependencies": {
|
||||
"jshint": "~2.1.10",
|
||||
"mocha": "~1.12.1",
|
||||
"happen": "~0.1.3",
|
||||
"karma": "~0.10.2",
|
||||
"uglify-js": "~2.4.0",
|
||||
"jake": "~0.6.11",
|
||||
"karma-mocha": "~0.1.0"
|
||||
},
|
||||
"main": "dist/leaflet.js",
|
||||
"scripts": {
|
||||
"test": "jake test",
|
||||
"prepublish": "jake"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/Leaflet/Leaflet.git"
|
||||
},
|
||||
"keywords": [
|
||||
"gis",
|
||||
"map"
|
||||
]
|
||||
}
|
||||
|
@ -1,2 +1,2 @@
|
||||
// put after Leaflet files as imagePath can't be detected in a PhantomJS env
|
||||
L.Icon.Default.imagePath = "../dist/images";
|
||||
L.Icon.Default.imagePath = "/base/dist/images";
|
||||
|
@ -1,64 +1,65 @@
|
||||
// Karma configuration
|
||||
var libSources = require(__dirname+'/../build/build.js').getFiles();
|
||||
module.exports = function (config) {
|
||||
|
||||
// base path, that will be used to resolve files and exclude
|
||||
basePath = '';
|
||||
var libSources = require(__dirname+'/../build/build.js').getFiles();
|
||||
|
||||
for (var i=0; i < libSources.length; i++) {
|
||||
libSources[i] = "../" + libSources[i];
|
||||
}
|
||||
var files = [
|
||||
"spec/before.js",
|
||||
"spec/sinon.js",
|
||||
"spec/expect.js"
|
||||
].concat(libSources, [
|
||||
"spec/after.js",
|
||||
"node_modules/happen/happen.js",
|
||||
"spec/suites/SpecHelper.js",
|
||||
"spec/suites/**/*.js",
|
||||
{pattern: "dist/images/*.png", included: false}
|
||||
]);
|
||||
|
||||
// list of files / patterns to load in the browser
|
||||
files = [].concat([
|
||||
"../node_modules/mocha/mocha.js",
|
||||
MOCHA_ADAPTER,
|
||||
"before.js",
|
||||
"sinon.js",
|
||||
"expect.js"
|
||||
], libSources, [
|
||||
"after.js",
|
||||
"../node_modules/happen/happen.js",
|
||||
"suites/SpecHelper.js",
|
||||
"suites/**/*.js"
|
||||
]);
|
||||
config.set({
|
||||
// base path, that will be used to resolve files and exclude
|
||||
basePath: '../',
|
||||
|
||||
// list of files to exclude
|
||||
exclude = [
|
||||
];
|
||||
plugins: ['karma-mocha', 'karma-phantomjs-launcher'],
|
||||
|
||||
// test results reporter to use
|
||||
// possible values: 'dots', 'progress', 'junit'
|
||||
reporters = ['dots'];
|
||||
// frameworks to use
|
||||
frameworks: ['mocha'],
|
||||
|
||||
// web server port
|
||||
port = 8080;
|
||||
// list of files / patterns to load in the browser
|
||||
files: files,
|
||||
exclude: [],
|
||||
|
||||
// cli runner port
|
||||
runnerPort = 9100;
|
||||
// test results reporter to use
|
||||
// possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
|
||||
reporters: ['dots'],
|
||||
|
||||
// enable / disable colors in the output (reporters and logs)
|
||||
colors = true;
|
||||
// web server port
|
||||
port: 9876,
|
||||
|
||||
// level of logging
|
||||
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
|
||||
logLevel = LOG_WARN;
|
||||
// level of logging
|
||||
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
|
||||
logLevel: config.LOG_WARN,
|
||||
|
||||
// enable / disable watching file and executing tests whenever any file changes
|
||||
autoWatch = false;
|
||||
// enable / disable colors in the output (reporters and logs)
|
||||
colors: true,
|
||||
|
||||
// Start these browsers, currently available:
|
||||
// - Chrome
|
||||
// - ChromeCanary
|
||||
// - Firefox
|
||||
// - Opera
|
||||
// - Safari (only Mac)
|
||||
// - PhantomJS
|
||||
// - IE (only Windows)
|
||||
browsers = ['PhantomJS'];
|
||||
// enable / disable watching file and executing tests whenever any file changes
|
||||
autoWatch: false,
|
||||
|
||||
// If browser does not capture in given timeout [ms], kill it
|
||||
captureTimeout = 5000;
|
||||
// Start these browsers, currently available:
|
||||
// - Chrome
|
||||
// - ChromeCanary
|
||||
// - Firefox
|
||||
// - Opera
|
||||
// - Safari (only Mac)
|
||||
// - PhantomJS
|
||||
// - IE (only Windows)
|
||||
browsers: ['PhantomJS'],
|
||||
|
||||
// Continuous Integration mode
|
||||
// if true, it capture browsers, run tests and exit
|
||||
singleRun = true;
|
||||
// If browser does not capture in given timeout [ms], kill it
|
||||
captureTimeout: 5000,
|
||||
|
||||
// Continuous Integration mode
|
||||
// if true, it capture browsers, run tests and exit
|
||||
singleRun: true
|
||||
});
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user