merge #1340, fix whitespace
This commit is contained in:
commit
86cfce1771
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,3 +7,4 @@ tmp/**/*
|
|||||||
*.sublime-*
|
*.sublime-*
|
||||||
_site
|
_site
|
||||||
dist/*.js
|
dist/*.js
|
||||||
|
coverage/
|
||||||
|
@ -158,11 +158,24 @@ exports.build = function (compsBase32, buildName) {
|
|||||||
exports.test = function() {
|
exports.test = function() {
|
||||||
var testacular = require('testacular'),
|
var testacular = require('testacular'),
|
||||||
testConfig = {configFile : __dirname + '/../spec/testacular.conf.js'};
|
testConfig = {configFile : __dirname + '/../spec/testacular.conf.js'};
|
||||||
|
|
||||||
testConfig.browsers = ['PhantomJS'];
|
testConfig.browsers = ['PhantomJS'];
|
||||||
isArgv('--chrome') && testConfig.browsers.push('Chrome');
|
isArgv('--chrome') && testConfig.browsers.push('Chrome');
|
||||||
isArgv('--ff') && testConfig.browsers.push('Firefox');
|
isArgv('--ff') && testConfig.browsers.push('Firefox');
|
||||||
|
|
||||||
|
// will work only with new testacular that supports code coverage (today it's in master)
|
||||||
|
if (isArgv('--cov')) { // temporary hack until testacular with coverage becomes stable
|
||||||
|
testacular = require('../node_modules/testacular/lib/index.js'); // use local testacular
|
||||||
|
testConfig.preprocessors = {
|
||||||
|
'**/src/**/*.js': 'coverage',
|
||||||
|
};
|
||||||
|
testConfig.coverageReporter = {
|
||||||
|
type : 'html',
|
||||||
|
dir : 'coverage/'
|
||||||
|
};
|
||||||
|
testConfig.reporters = ['coverage'];
|
||||||
|
}
|
||||||
|
|
||||||
testacular.server.start(testConfig);
|
testacular.server.start(testConfig);
|
||||||
|
|
||||||
function isArgv(optName){
|
function isArgv(optName){
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"description": "JavaScript library for mobile-friendly interactive maps",
|
"description": "JavaScript library for mobile-friendly interactive maps",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"jshint": "~0.9.1",
|
"jshint": "~0.9.1",
|
||||||
"testacular": "~0.4.0",
|
"testacular": "latest",
|
||||||
"uglify-js": "~2.2.3",
|
"uglify-js": "~2.2.3",
|
||||||
"jake": "latest"
|
"jake": "latest"
|
||||||
},
|
},
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
// Testacular configuration
|
// Testacular configuration
|
||||||
|
|
||||||
var libSources = require(__dirname+'/../build/build.js').getFiles();
|
var libSources = require(__dirname+'/../build/build.js').getFiles();
|
||||||
|
|
||||||
// base path, that will be used to resolve files and exclude
|
// base path, that will be used to resolve files and exclude
|
||||||
@ -11,36 +10,18 @@ for (var i=0; i < libSources.length; i++) {
|
|||||||
|
|
||||||
// list of files / patterns to load in the browser
|
// list of files / patterns to load in the browser
|
||||||
files = [].concat([
|
files = [].concat([
|
||||||
JASMINE,
|
JASMINE,
|
||||||
JASMINE_ADAPTER,
|
JASMINE_ADAPTER,
|
||||||
"before.js"
|
"before.js"
|
||||||
], libSources, [
|
], libSources, [
|
||||||
"after.js",
|
"after.js",
|
||||||
"happen.js",
|
"happen.js",
|
||||||
"suites/SpecHelper.js",
|
"suites/SpecHelper.js",
|
||||||
"suites/LeafletSpec.js",
|
"suites/**/*.js"
|
||||||
"suites/control/Control.LayersSpec.js",
|
]);
|
||||||
"suites/control/Control.ScaleSpec.js",
|
|
||||||
"suites/core/UtilSpec.js",
|
|
||||||
"suites/core/ClassSpec.js",
|
|
||||||
"suites/core/EventsSpec.js",
|
|
||||||
"suites/geometry/PointSpec.js",
|
|
||||||
"suites/geometry/BoundsSpec.js",
|
|
||||||
"suites/geometry/TransformationSpec.js",
|
|
||||||
"suites/geo/LatLngSpec.js",
|
|
||||||
"suites/geo/LatLngBoundsSpec.js",
|
|
||||||
"suites/geo/ProjectionSpec.js",
|
|
||||||
"suites/dom/DomEventSpec.js",
|
|
||||||
"suites/dom/DomUtilSpec.js",
|
|
||||||
"suites/layer/TileLayerSpec.js",
|
|
||||||
"suites/layer/vector/CircleSpec.js",
|
|
||||||
"suites/layer/vector/CircleMarkerSpec.js",
|
|
||||||
"suites/layer/vector/PolylineGeometrySpec.js",
|
|
||||||
"suites/map/MapSpec.js"
|
|
||||||
]);
|
|
||||||
|
|
||||||
// list of files to exclude
|
// list of files to exclude
|
||||||
exclude = [
|
exclude = [
|
||||||
];
|
];
|
||||||
|
|
||||||
// test results reporter to use
|
// test results reporter to use
|
||||||
|
Loading…
Reference in New Issue
Block a user