Commit 42f42d6e authored by Sebastian Pekarek's avatar Sebastian Pekarek
Browse files

grunt for jshint

parent 352f16a0
module.exports = function(grunt) {
'use strict';
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.initConfig({
clean: {
coverage: ['coverage/**']
},
jshint: {
options: {
jshintrc: true
},
lib: [
'lib/*.js',
'test/*.js'
]
},
watch: {
lib: {
files: ['lib/*.js', 'test/*.js'],
tasks: ['jshint:lib']
}
}
});
grunt.registerTask('default', ['jshint:lib']);
grunt.registerTask('dev', ['jshint:lib', 'watch']);
};
\ No newline at end of file
......@@ -9,15 +9,19 @@
},
"dependencies": {},
"devDependencies": {
"mocha": "^1.20.1",
"grunt": "^0.4.5",
"grunt-contrib-clean": "^0.6.0",
"grunt-contrib-jshint": "^0.11.0",
"grunt-contrib-watch": "^0.6.1",
"istanbul": "^0.3.0",
"mocha": "^1.20.1",
"portfinder": "^0.2.1"
},
"scripts": {
"test": "istanbul cover _mocha -- -R spec"
"test": "istanbul cover _mocha -- -R spec && grunt"
},
"preferGlobal": false,
"main": "./lib/ical-generator.js",
"main": "./lib/index.js",
"repository": {
"type": "git",
"url": "http://github.com/sebbo2002/ical-generator.git"
......
......@@ -397,9 +397,9 @@ describe('ical-generator 0.1.x', function() {
cal.addEvent({
uid: '123',
start: new Date("Fr Oct 04 2013 22:39:30 UTC"),
end: new Date("Fr Oct 04 2013 23:15:00 UTC"),
stamp: new Date("Fr Oct 04 2013 23:34:53 UTC"),
start: new Date('Fr Oct 04 2013 22:39:30 UTC'),
end: new Date('Fr Oct 04 2013 23:15:00 UTC'),
stamp: new Date('Fr Oct 04 2013 23:34:53 UTC'),
summary: 'Simple Event'
});
......@@ -420,9 +420,9 @@ describe('ical-generator 0.1.x', function() {
cal.addEvent({
uid: '123',
start: new Date("Fr Oct 04 2013 22:39:30 UTC"),
end: new Date("Fr Oct 04 2013 23:15:00 UTC"),
stamp: new Date("Fr Oct 04 2013 23:34:53 UTC"),
start: new Date('Fr Oct 04 2013 22:39:30 UTC'),
end: new Date('Fr Oct 04 2013 23:15:00 UTC'),
stamp: new Date('Fr Oct 04 2013 23:34:53 UTC'),
summary: 'Sample Event',
location: 'localhost',
description: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.\nbeep boop'
......@@ -445,10 +445,10 @@ describe('ical-generator 0.1.x', function() {
cal.addEvent({
uid: '123',
start: new Date("Fr Oct 04 2013 22:39:30 UTC"),
end: new Date("Fr Oct 06 2013 23:15:00 UTC"),
start: new Date('Fr Oct 04 2013 22:39:30 UTC'),
end: new Date('Fr Oct 06 2013 23:15:00 UTC'),
allDay: true,
stamp: new Date("Fr Oct 04 2013 23:34:53 UTC"),
stamp: new Date('Fr Oct 04 2013 23:34:53 UTC'),
summary: 'Sample Event',
organizer: {
name: 'Sebastian Pekarek',
......@@ -476,9 +476,9 @@ describe('ical-generator 0.1.x', function() {
cal.addEvent({
uid: '1',
start: new Date("Fr Oct 04 2013 22:39:30 UTC"),
end: new Date("Fr Oct 06 2013 23:15:00 UTC"),
stamp: new Date("Fr Oct 04 2013 23:34:53 UTC"),
start: new Date('Fr Oct 04 2013 22:39:30 UTC'),
end: new Date('Fr Oct 06 2013 23:15:00 UTC'),
stamp: new Date('Fr Oct 04 2013 23:34:53 UTC'),
summary: 'repeating by month',
repeating: {
freq: 'MONTHLY'
......@@ -487,9 +487,9 @@ describe('ical-generator 0.1.x', function() {
cal.addEvent({
uid: '2',
start: new Date("Fr Oct 04 2013 22:39:30 UTC"),
end: new Date("Fr Oct 06 2013 23:15:00 UTC"),
stamp: new Date("Fr Oct 04 2013 23:34:53 UTC"),
start: new Date('Fr Oct 04 2013 22:39:30 UTC'),
end: new Date('Fr Oct 06 2013 23:15:00 UTC'),
stamp: new Date('Fr Oct 04 2013 23:34:53 UTC'),
summary: 'repeating by day, twice',
repeating: {
freq: 'DAILY',
......@@ -499,14 +499,14 @@ describe('ical-generator 0.1.x', function() {
cal.addEvent({
uid: '3',
start: new Date("Fr Oct 04 2013 22:39:30 UTC"),
end: new Date("Fr Oct 06 2013 23:15:00 UTC"),
stamp: new Date("Fr Oct 04 2013 23:34:53 UTC"),
start: new Date('Fr Oct 04 2013 22:39:30 UTC'),
end: new Date('Fr Oct 06 2013 23:15:00 UTC'),
stamp: new Date('Fr Oct 04 2013 23:34:53 UTC'),
summary: 'repeating by 3 weeks, until 2014',
repeating: {
freq: 'WEEKLY',
interval: 3,
until: new Date("We Jan 01 2014 00:00:00 UTC")
until: new Date('We Jan 01 2014 00:00:00 UTC')
}
});
......@@ -527,9 +527,9 @@ describe('ical-generator 0.1.x', function() {
cal.addEvent({
uid: '1',
start: new Date("Fr Oct 04 2013 22:39:30 UTC"),
end: new Date("Fr Oct 06 2013 23:15:00 UTC"),
stamp: new Date("Fr Oct 04 2013 23:34:53 UTC"),
start: new Date('Fr Oct 04 2013 22:39:30 UTC'),
end: new Date('Fr Oct 06 2013 23:15:00 UTC'),
stamp: new Date('Fr Oct 04 2013 23:34:53 UTC'),
summary: 'floating',
floating: true
});
......
......@@ -197,8 +197,7 @@ describe('ical-generator 0.2.x / ICalCalendar', function() {
});
it('should throw error when event invalid', function() {
var file = path.join(__dirname, 'save.ical'),
cal = ical(),
var cal = ical(),
e = cal.createEvent();
assert.throws(function() {
......@@ -228,8 +227,7 @@ describe('ical-generator 0.2.x / ICalCalendar', function() {
});
it('should throw error when event invalid', function() {
var file = path.join(__dirname, 'save.ical'),
cal = ical(),
var cal = ical(),
e = cal.createEvent();
assert.throws(function() {
......@@ -845,7 +843,7 @@ describe('ical-generator 0.2.x / ICalCalendar', function() {
summary: 'Example Event'
});
assert.throws(function() {
e.generate()
e.generate();
}, /`calendar`/);
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment