Skip to content

Commit

Permalink
Convert tests to JS before running so we don't need browser-side conv…
Browse files Browse the repository at this point in the history
…ersion
  • Loading branch information
bergie committed Jan 5, 2017
1 parent 2aa0642 commit 3dee067
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
15 changes: 14 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@
command: 'node ./scripts/build-font-awesome-javascript.js'
}
},
coffee: {
specs: {
options: {
bare: true
},
expand: true,
cwd: 'spec',
src: ['**.coffee'],
dest: 'spec',
ext: '.js'
}
},
browserify: {
libs: {
files: {
Expand Down Expand Up @@ -120,12 +132,13 @@
this.loadNpmTasks('grunt-contrib-watch');
this.loadNpmTasks('grunt-contrib-jshint');
this.loadNpmTasks('grunt-contrib-connect');
this.loadNpmTasks('grunt-contrib-coffee');
this.loadNpmTasks('grunt-browserify');
this.loadNpmTasks('grunt-mocha-phantomjs');

this.registerTask('dev', ['test', 'watch']);
this.registerTask('build', ['bower-install-simple', 'exec:build_stylus', 'exec:build_fa', 'browserify:libs']);
this.registerTask('test', ['jshint:all', 'build', 'connect:server', 'mocha_phantomjs']);
this.registerTask('test', ['jshint:all', 'build', 'coffee', 'connect:server', 'mocha_phantomjs']);
this.registerTask('default', ['test']);
};

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"grunt": "~1.0.1",
"grunt-bower-install-simple": "^1.2.3",
"grunt-browserify": "~5.0.0",
"grunt-contrib-coffee": "^1.0.0",
"grunt-contrib-connect": "^1.0.2",
"grunt-contrib-jshint": "~1.0.0",
"grunt-contrib-watch": "~1.0.0",
Expand Down
10 changes: 4 additions & 6 deletions spec/runner.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,9 @@

<the-graph-nav id="nav" width="216" height="162"></the-graph-nav>

<script src="basics.coffee" type="text/coffeescript"></script>
<script src="editing.coffee" type="text/coffeescript"></script>
<script src="graphchanges.coffee" type="text/coffeescript"></script>
<script src="runmocha.coffee" type="text/coffeescript"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/coffee-script/1.7.1/coffee-script.min.js"></script>
<script src="basics.js"></script>
<script src="editing.js"></script>
<script src="graphchanges.js"></script>
<script src="runmocha.js"></script>
</body>
</html>

0 comments on commit 3dee067

Please sign in to comment.