Skip to content

Commit

Permalink
Generate browser test runner
Browse files Browse the repository at this point in the history
  • Loading branch information
bergie committed May 30, 2017
1 parent 6be7f46 commit e0917bc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 36 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ node_modules/
npm-debug.log
components/*/
spec/*.xml
spec/runner.html
11 changes: 9 additions & 2 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ module.exports = ->
build:
files:
'browser/noflo-adapters.js': ['package.json']
# Generate runner.html
noflo_browser_mocha:
all:
options:
scripts: ["../browser/noflo-adapters.js"]
files:
'spec/runner.html': ['spec/*.js', '!spec/fbpspec.js']

# JavaScript minification for the browser
uglify:
Expand Down Expand Up @@ -67,18 +74,18 @@ module.exports = ->

# Our local tasks
@registerTask 'build', 'Build NoFlo for the chosen target platform', (target = 'all') =>
@task.run 'coffee'
if target is 'all' or target is 'browser'
@task.run 'noflo_browser'
@task.run 'uglify'

@registerTask 'test', 'Build NoFlo and run automated tests', (target = 'all') =>
@task.run 'coffeelint'
@task.run 'coffee'
if target is 'all' or target is 'nodejs'
@task.run 'mochaTest'
if target is 'all' or target is 'browser'
@task.run 'noflo_browser'
@task.run 'coffee'
@task.run 'noflo_browser_mocha'
@task.run 'mocha_phantomjs'

@registerTask 'default', ['test']
34 changes: 0 additions & 34 deletions spec/runner.html

This file was deleted.

0 comments on commit e0917bc

Please sign in to comment.