Permalink
Browse files

fix for coverage test after node removed require.paths

  • Loading branch information...
1 parent e7842de commit 8e8b0dc9db55889f746909f8dcb94fb6c99fec9a @russellmcc committed Sep 1, 2013
Showing with 15 additions and 11 deletions.
  1. +11 −10 Cakefile
  2. +4 −1 test/test-osc-utilities.coffee
View
@@ -2,15 +2,16 @@ fs = require 'fs'
child = require 'child_process'
task 'test', 'run tests (requires development install)', (options) ->
- process.env['NODE_PATH'] = './lib/:$NODE_PATH'
- test = child.spawn 'expresso', ['test']
- test.stdout.pipe process.stdout
- test.stderr.pipe process.stderr
+ process.env['NODE_PATH'] = './lib/:$NODE_PATH'
+ test = child.spawn 'expresso', ['test']
+ test.stdout.pipe process.stdout
+ test.stderr.pipe process.stderr
task 'coverage', 'run tests with coverage check (requires development install)', (options) ->
- compile = child.exec 'coffee -c lib', ->
- process.env['NODE_PATH'] = './lib/:$NODE_PATH'
- test = child.spawn 'expresso', ['--cov', 'test']
+ child.exec 'coffee -c lib', ->
+ process.env['NODE_PATH'] = './lib/:$NODE_PATH'
+ child.exec 'node-jscoverage lib lib-cov', ->
+ test = child.spawn 'expresso', ['test']
test.stdout.pipe process.stdout
test.stderr.pipe process.stderr
test.on "exit", () ->
@@ -19,6 +20,6 @@ task 'coverage', 'run tests with coverage check (requires development install)',
child.exec "rm -rf lib-cov " + output
task 'doc', 'create md and html doc files', (options) ->
- child.exec 'coffee -b -c examples/*', ->
- child.exec 'docket lib/* examples/* -m', ->
- child.exec 'docket lib/* examples/* -d doc_html'
+ child.exec 'coffee -b -c examples/*', ->
+ child.exec 'docket lib/* examples/* -m', ->
+ child.exec 'docket lib/* examples/* -d doc_html'
@@ -2,8 +2,11 @@
# This file was used for TDD and as such probably has limited utility as
# actual unit tests.
#
+try
+ osc = require '../lib-cov/osc-utilities'
+catch
+ osc = require '../lib/osc-utilities'
-osc = require "../lib/osc-utilities"
assert = require "assert"
# Basic string tests.

0 comments on commit 8e8b0dc

Please sign in to comment.