Skip to content

Commit

Permalink
v0.3.3 - DEBUG:false default, clean tests, add mocha reporter
Browse files Browse the repository at this point in the history
  • Loading branch information
blackout314 committed Oct 18, 2015
1 parent 976e4ca commit c8c39c3
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 24 deletions.
34 changes: 17 additions & 17 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
});
};
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/pi.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
});

Expand Down
4 changes: 2 additions & 2 deletions tests/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Expand All @@ -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 );

Expand Down
2 changes: 1 addition & 1 deletion tests/pubsub.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit c8c39c3

Please sign in to comment.