diff --git a/karma.conf.js b/karma.conf.js index 4040400..ed26ea0 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -2,26 +2,26 @@ module.exports = function(config) { config.set({ autoWatch: false, singleRun: true, - basePath: '.', - frameworks: ['qunit','sinon'], - reporters: ['progress', 'coverage'], + basePath: '.', + frameworks: ['qunit','sinon'], + reporters: ['mocha', 'coverage'], preprocessors: { - 'src/*.js': ['coverage'] - }, + 'src/*.js': ['coverage'] + }, coverageReporter: { - type : 'lcov', - dir : 'coverage/' - }, + type : 'lcov', + dir : 'coverage/' + }, browsers: ['Firefox'], files: [ - 'src/pi.js', - 'src/html.js', - 'src/ajax.js', - 'src/events.js', - 'src/storage.js', - 'src/util.pubsub.js', - 'src/util.route.js', - "tests/**.js" - ] + 'src/pi.js', + 'src/html.js', + 'src/ajax.js', + 'src/events.js', + 'src/storage.js', + 'src/util.pubsub.js', + 'src/util.route.js', + "tests/**.js" + ] }); }; diff --git a/package.json b/package.json index aed8382..b1a5dea 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pi", - "version": "0.3.2", + "version": "0.3.3", "devDependencies": { "grunt": "^0.4.5", "grunt-contrib-jasmine": "^0.9.1", @@ -21,7 +21,8 @@ "karma-phantomjs-launcher": "~0.1", "karma-qunit": "~0.1", "karma-sinon": "~1.0", - "zuul": "^1.17.1" + "zuul": "^1.17.1", + "karma-mocha-reporter": "~1.1.1" }, "scripts": { "test": "grunt default" diff --git a/src/pi.js b/src/pi.js index 27ef761..eac5edd 100644 --- a/src/pi.js +++ b/src/pi.js @@ -103,7 +103,7 @@ pi.ready = function (callback) { pi.C = { "version" : "@@VERSION_NUMBER", - "DEBUG" : true, + "DEBUG" : false, feature : { "srcSetSupported" : typeof (new Image().srcset) !== 'undefined', // srcset supported? "addEventListener" : !!window.addEventListener, // eventListener diff --git a/tests/dom.js b/tests/dom.js index 2825220..8a271fd 100644 --- a/tests/dom.js +++ b/tests/dom.js @@ -63,7 +63,7 @@ test('dom H append', function(){ test('dom foreach', function() { var result = pii.forEach('#not', 'classAdd', 'class'); - console.log(result); + //console.log(result); ok( result === false ); }); diff --git a/tests/events.js b/tests/events.js index eeaf685..527c484 100644 --- a/tests/events.js +++ b/tests/events.js @@ -12,7 +12,7 @@ test('pi.E : events test ok', function(){ }); test('pi.E events on', function(){ - var a = function(){ console.log('x'); }; + var a = function(){ /* console.log('x');*/ }; pi.E.on('#test','click',a); // add event ok( pi.E.eventsArray['#test']['click'].length === 1 ); @@ -21,7 +21,7 @@ test('pi.E events on', function(){ }); test('pi.E events rm', function(){ - var a = function(){ console.log('x'); }; + var a = function(){ /*console.log('x');*/ }; pi.E.on('#test','click',a); // add event ok( pi.E.eventsArray['#test']['click'].length === 1 ); diff --git a/tests/pubsub.js b/tests/pubsub.js index ee2f9cf..e17c7e1 100644 --- a/tests/pubsub.js +++ b/tests/pubsub.js @@ -11,7 +11,7 @@ test('pi.T : topics test ok', function(){ test('pi.T topics on', function(){ var global = 0; - var callback = function(a){ console.log('LOG: '+a); global = global + 1;}; + var callback = function(a){ /*console.log('LOG: '+a);*/ global = global + 1;}; pi.T.sub('NOTICE', callback); pi.T.pub('NOTICE',['hello']); ok( global === 1 );