jshint tests

This commit is contained in:
Kasper Moskwiak 2015-12-20 12:01:23 +01:00
parent 1121c822d9
commit 437ecd076c
3 changed files with 12 additions and 3 deletions

View file

@ -81,4 +81,8 @@ module.exports = function(grunt) {
'qunit', 'qunit',
'concat', 'concat',
'uglify']); 'uglify']);
grunt.registerTask('test', [
'jshint'
]);
}; };

View file

@ -80,7 +80,7 @@
// Probably because of https://github.com/videojs/video-js-swf/issues/124 // Probably because of https://github.com/videojs/video-js-swf/issues/124
// If player preload is 'none' and then loadeddata not fired. So, we need timeupdate event for seek handle (timeupdate doesn't work properly with flash) // If player preload is 'none' and then loadeddata not fired. So, we need timeupdate event for seek handle (timeupdate doesn't work properly with flash)
var handleSeekEvent = 'loadeddata'; var handleSeekEvent = 'loadeddata';
if(this.player_.preload() == 'none' && this.player_.techName_ != 'Flash') { if(this.player_.preload() === 'none' && this.player_.techName_ !== 'Flash') {
handleSeekEvent = 'timeupdate'; handleSeekEvent = 'timeupdate';
} }
setSourcesSanitized(this.player_, this.src, this.options_.label, customSourcePicker).one(handleSeekEvent, function() { setSourcesSanitized(this.player_, this.src, this.options_.label, customSourcePicker).one(handleSeekEvent, function() {
@ -201,7 +201,7 @@
*/ */
player.getGroupedSrc = function(){ player.getGroupedSrc = function(){
return groupedSrc; return groupedSrc;
} };
/** /**
* Method used for sorting list of sources * Method used for sorting list of sources

View file

@ -31,7 +31,12 @@
"source", "source",
"videojs-plugin" "videojs-plugin"
], ],
"dependencies": {}, "scripts": {
"test": "grunt test"
},
"dependencies": {
"grunt": "^0.4.5"
},
"devDependencies": { "devDependencies": {
"grunt-contrib-clean": "^0.7", "grunt-contrib-clean": "^0.7",
"grunt-contrib-concat": "^0.5", "grunt-contrib-concat": "^0.5",