Skip to content

Commit

Permalink
tests: Add basic tests for the-graph-render (node.js)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnor committed Jan 3, 2018
1 parent c00259c commit 9cbd480
Show file tree
Hide file tree
Showing 5 changed files with 1,546 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -4,6 +4,6 @@ node_modules/
/build
/dist
npm-debug.log
/spec/*.js
/spec/temp/
/coverage
package-lock.json
13 changes: 12 additions & 1 deletion Gruntfile.js
Expand Up @@ -121,17 +121,28 @@
}
},
},
mochaTest: {
nodejs: {
src: ['spec/*.js'],
options: {
reporter: 'spec',
grep: process.env.TESTS,
},
}
},
});

this.loadNpmTasks('grunt-exec');
this.loadNpmTasks('grunt-mocha-test');
this.loadNpmTasks('grunt-contrib-jshint');
this.loadNpmTasks('grunt-contrib-connect');
this.loadNpmTasks('grunt-contrib-watch');
this.loadNpmTasks('grunt-browserify');

this.registerTask('dev', ['connect', 'test', 'watch']);
this.registerTask('build', ['exec:build_stylus', 'exec:build_fa', 'browserify:libs', 'browserify:vendor', 'browserify:render']);
this.registerTask('test', ['jshint:all', 'build', 'exec:jest']);
this.registerTask('test', ['jshint:all', 'build', 'exec:jest', 'mochaTest:nodejs']);

this.registerTask('default', ['test']);
};

Expand Down
4 changes: 4 additions & 0 deletions package.json
Expand Up @@ -20,8 +20,10 @@
"yargs": "^10.0.3"
},
"devDependencies": {
"bluebird": "^3.5.1",
"browserify-css": "^0.14.0",
"canvas-prebuilt": "^1.6.5-prerelease.1",
"chai": "^4.1.2",
"coffee-script": "^1.12.2",
"coffeeify": "^2.0.1",
"enzyme": "^3.2.0",
Expand All @@ -33,9 +35,11 @@
"grunt-contrib-jshint": "~1.1.0",
"grunt-contrib-watch": "~1.0.0",
"grunt-exec": "~2.0.0",
"grunt-mocha-test": "^0.13.3",
"jest": "^21.2.1",
"jest-enzyme": "^4.0.1",
"jsjob": "^0.10.13",
"mocha": "^4.1.0",
"react": "^15.6.2",
"react-dom": "^15.6.2",
"react-test-renderer": "^15.6.2",
Expand Down

0 comments on commit 9cbd480

Please sign in to comment.