[Pkg-javascript-commits] [leaflet] 93/301: update karma config to work on version 0.10
Jonas Smedegaard
js at moszumanska.debian.org
Mon Jan 27 22:22:44 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository leaflet.
commit f04527b3081440fb65e98710f46f31d9b9d2ebd2
Author: Vladimir Agafonkin <agafonkin at gmail.com>
Date: Thu Sep 12 13:13:49 2013 +0300
update karma config to work on version 0.10
---
package.json | 46 +++++++++++++-----------
spec/after.js | 2 +-
spec/karma.conf.js | 101 +++++++++++++++++++++++++++--------------------------
3 files changed, 77 insertions(+), 72 deletions(-)
diff --git a/package.json b/package.json
index b203c75..3349db9 100644
--- a/package.json
+++ b/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"
+ ]
}
diff --git a/spec/after.js b/spec/after.js
index 7dcd1d9..94d1dfe 100644
--- a/spec/after.js
+++ b/spec/after.js
@@ -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";
diff --git a/spec/karma.conf.js b/spec/karma.conf.js
index 3bc1f07..0ed3f82 100644
--- a/spec/karma.conf.js
+++ b/spec/karma.conf.js
@@ -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
+ });
+};
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/leaflet.git
More information about the Pkg-javascript-commits
mailing list