Skip to content

Commit

Permalink
added grunt test on watch
Browse files Browse the repository at this point in the history
  • Loading branch information
DubFriend committed Apr 20, 2014
1 parent f7107c8 commit 0c39348
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
20 changes: 20 additions & 0 deletions gruntfile.js
@@ -0,0 +1,20 @@
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),

nodeunit: {
all: ['test.js']
},

watch: {
scripts: {
files: ['**/*'],
tasks: ['nodeunit']
}
}
});

grunt.loadNpmTasks('grunt-contrib-nodeunit');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', ['nodeunit']);
};
5 changes: 4 additions & 1 deletion package.json
Expand Up @@ -19,7 +19,10 @@
},
"devDependencies": {
"mysql": "~2.1.1",
"sqlite3": "~2.1.15"
"sqlite3": "~2.1.15",
"grunt": "~0.4.4",
"grunt-contrib-nodeunit": "~0.3.3",
"grunt-contrib-watch": "~0.6.1"
},
"scripts": {
"test": "nodeunit test.js"
Expand Down
1 change: 0 additions & 1 deletion test.js
Expand Up @@ -65,7 +65,6 @@ var createTests = function (fig) {
this.sql.query(
'SeLECT * FROM TableA',
function (err, rows) {
console.log(err);
test.deepEqual(rows, [{ id: 2, col: "default"}]);
test.done();
}
Expand Down

0 comments on commit 0c39348

Please sign in to comment.