Skip to content

Commit

Permalink
travis: run linter and fix lint problems in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
avindra committed Jul 8, 2016
1 parent 7188859 commit 5f4d9d8
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 12 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,11 @@ language: node_js
node_js:
- 'node' # implies latest version

env:
- CMD=test
- CMD=lint

before_script:
- bower install

script: npm run $CMD
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"CONTRIBUTING.*"
],
"scripts": {
"test" : "grunt dev && grunt karma:single"
"test" : "grunt dev && grunt karma:single",
"lint" : "grunt check"
}
}
14 changes: 12 additions & 2 deletions tests/automated/refetchEvents.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@ describe('refetchEvents', function() {
// set a 100ms timeout on this event source
options.eventSources[0].events = function(start, end, timezone, callback) {
var events = [
{ id: '1', start: '2015-08-07T02:00:00', end: '2015-08-07T03:00:00', title: 'event A', className: 'fetch' + fetchCount }
{ id: '1',
start: '2015-08-07T02:00:00',
end: '2015-08-07T03:00:00',
title: 'event A', className: 'fetch' + fetchCount
}
];

setTimeout(function() {
Expand Down Expand Up @@ -123,7 +127,13 @@ describe('refetchEvents', function() {
function createEventGenerator() {
return function(start, end, timezone, callback) {
var events = [
{ id: 1, start: '2015-08-07T02:00:00', end: '2015-08-07T03:00:00', title: 'event A', className: 'fetch' + fetchCount }
{
id: 1,
start: '2015-08-07T02:00:00',
end: '2015-08-07T03:00:00',
title: 'event A',
className: 'fetch' + fetchCount
}
];

callback(events);
Expand Down
14 changes: 7 additions & 7 deletions tests/automated/removeEventSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,21 @@ describe('removeEventSource', function() {

var source1 = function(start, end, timezone, callback) {
setTimeout(function() {
callback([{
callback([ {
title: 'event1',
className: 'event1',
start: '2014-08-01T02:00:00'
}]);
} ]);
}, 100);
};

var source2 = function(start, end, timezone, callback) {
setTimeout(function() {
callback([{
callback([ {
title: 'event2',
className: 'event2',
start: '2014-08-01T02:00:00'
}]);
} ]);
}, 100);
};

Expand All @@ -94,10 +94,10 @@ describe('removeEventSource', function() {

describe('when multiple sources share the same fetching function', function() {
var fetchFunc = function(start, end, timezone, callback) {
callback([{
callback([ {
title: 'event',
start: '2014-08-01T02:00:00'
}]);
} ]);
};
beforeEach(function() {
options.eventSources = [
Expand Down Expand Up @@ -192,4 +192,4 @@ describe('removeEventSource', function() {
expect($('.fc-event').length).toBe(cnt);
expect($('#cal').fullCalendar('clientEvents').length).toBe(cnt);
}
});
});
4 changes: 2 additions & 2 deletions tests/automated/removeEventSources.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ describe('removeEventSources', function() {
return {
id: id,
events: function(start, end, timezone, callback) {
callback([{
callback([ {
title: 'event' + id,
className: 'event' + id,
start: '2014-08-01T02:00:00'
}]);
} ]);
}
};
}
Expand Down

0 comments on commit 5f4d9d8

Please sign in to comment.