Skip to content

Commit

Permalink
[tests] fixes issue of instrumented code not being generated properly
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Rogers <chrissrogers@gmail.com>
  • Loading branch information
chrissrogers committed Apr 28, 2013
1 parent a9b39a6 commit 919cf70
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions test/maybe.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

// util
var _ = require('lodash');

// test data
Expand All @@ -7,16 +8,24 @@ var justs = [true, false, 0, '', [], {}],
reliable = function () { return process.hrtime(); },
unreliable = function () { return Math.random() > 0.5 || undefined; };

describe('Test coverage', function () {
// library
var Maybe = require('../');

it('should generate instrumentation', function (done) {
require('child_process').exec('$(npm root)/.bin/jscoverage lib lib-cov', done);
});
if (process.env.MAYBE_COV) {

});
describe('Test coverage', function () {

it('should generate instrumentation', function (done) {
require('child_process').exec('$(npm root)/.bin/jscoverage lib lib-cov', done);
});

it('should load the instrumented module', function () {
Maybe = require('../lib-cov/maybe');
});

});

// module
var Maybe = process.env.MAYBE_COV ? require('../lib-cov/maybe') : require('../');
}

describe('Maybe', function () {

Expand Down

0 comments on commit 919cf70

Please sign in to comment.