mirror of
https://github.com/grafana/grafana.git
synced 2025-08-01 19:14:19 +08:00
added phantomjs karma test to run in travis
This commit is contained in:
@ -51,7 +51,7 @@
|
|||||||
"npm": "1.2.x"
|
"npm": "1.2.x"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "grunt"
|
"test": "grunt test"
|
||||||
},
|
},
|
||||||
"license": "Apache License"
|
"license": "Apache License"
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
define([
|
define([
|
||||||
], function() {
|
'underscore'
|
||||||
|
], function(_) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
// This is auto generated from the unicode tables.
|
// This is auto generated from the unicode tables.
|
||||||
@ -256,7 +257,7 @@ define([
|
|||||||
return (/^[0-9a-fA-F]$/).test(str);
|
return (/^[0-9a-fA-F]$/).test(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
var readUnicodeEscapeSequence = function () {
|
var readUnicodeEscapeSequence = _.bind(function () {
|
||||||
/*jshint validthis:true */
|
/*jshint validthis:true */
|
||||||
index += 1;
|
index += 1;
|
||||||
|
|
||||||
@ -282,9 +283,9 @@ define([
|
|||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}.bind(this);
|
}, this);
|
||||||
|
|
||||||
var getIdentifierStart = function () {
|
var getIdentifierStart = _.bind(function () {
|
||||||
/*jshint validthis:true */
|
/*jshint validthis:true */
|
||||||
var chr = this.peek(index);
|
var chr = this.peek(index);
|
||||||
var code = chr.charCodeAt(0);
|
var code = chr.charCodeAt(0);
|
||||||
@ -313,9 +314,9 @@ define([
|
|||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}.bind(this);
|
}, this);
|
||||||
|
|
||||||
var getIdentifierPart = function () {
|
var getIdentifierPart = _.bind(function () {
|
||||||
/*jshint validthis:true */
|
/*jshint validthis:true */
|
||||||
var chr = this.peek(index);
|
var chr = this.peek(index);
|
||||||
var code = chr.charCodeAt(0);
|
var code = chr.charCodeAt(0);
|
||||||
@ -339,7 +340,7 @@ define([
|
|||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}.bind(this);
|
}, this);
|
||||||
|
|
||||||
char = getIdentifierStart();
|
char = getIdentifierStart();
|
||||||
if (char === null) {
|
if (char === null) {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
// Lint and build CSS
|
// Lint and build CSS
|
||||||
module.exports = function(grunt) {
|
module.exports = function(grunt) {
|
||||||
grunt.registerTask('default', ['jshint:source', 'less:src']);
|
grunt.registerTask('default', ['jshint:source', 'less:src']);
|
||||||
|
grunt.registerTask('test', ['default', 'karma:test']);
|
||||||
};
|
};
|
@ -1,9 +1,14 @@
|
|||||||
module.exports = function(config) {
|
module.exports = function(config) {
|
||||||
return {
|
return {
|
||||||
unit: {
|
dev: {
|
||||||
configFile: 'src/test/karma.conf.js',
|
configFile: 'src/test/karma.conf.js',
|
||||||
singleRun: false,
|
singleRun: false,
|
||||||
browsers: ['Chrome']
|
browsers: ['Chrome']
|
||||||
|
},
|
||||||
|
test: {
|
||||||
|
configFile: 'src/test/karma.conf.js',
|
||||||
|
singleRun: true,
|
||||||
|
browsers: ['PhantomJS']
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
Reference in New Issue
Block a user