Permalink
Browse files

Fix on demand jscoverage; some of the code depended on it during norm…

…al npm test.
  • Loading branch information...
1 parent 0caf741 commit 45b236742b7a71435461c4b79b279cc855962951 @richtera richtera committed Jul 22, 2012
@@ -1,14 +1,19 @@
/**
* Setup the bare minimum required for a fully functioning 'calipso' object
*/
-var jsc = require('jscoverage'),
- require = jsc.require(module), // rewrite require function
+if (process.env.CALIPSO_COV) {
+ var jsc = require('jscoverage'),
+ require = jsc.require(module); // rewrite require function
calipso = require('./require', true)('calipso'),
- path = require('path'),
+ Config = require('./require', true)('core/Configuration');
+} else {
+ var calipso = require('./require')('calipso'),
+ Config = require('./require')('core/Configuration');
+}
+ var path = require('path'),
fs = require('fs'),
colors = require('colors'),
rootpath = process.cwd() + '/',
- Config = require('./require', true)('core/Configuration'),
http = require('http'),
mochaConfig = path.join(rootpath,'tmp','mocha.json');
View
@@ -6,8 +6,6 @@ var should = require('should'),
rootpath = process.cwd() + '/',
path = require('path'),
exec = require('child_process').exec,
- jsc = require('jscoverage'),
- require = jsc.require(module), // rewrite require function
Helpers = require('./helpers/require')('core/Menu');
describe('Menus', function(){
View
@@ -6,8 +6,6 @@ var should = require('should'),
rootpath = process.cwd() + '/',
path = require('path'),
exec = require('child_process').exec,
- jsc = require('jscoverage'),
- require = jsc.require(module), // rewrite require function
Lib = require('./helpers/require')('core/Lib');
describe('Libraries', function(){
View
@@ -6,8 +6,6 @@ var should = require('should'),
rootpath = process.cwd() + '/',
path = require('path'),
exec = require('child_process').exec,
- jsc = require('jscoverage'),
- require = jsc.require(module), // rewrite require function
link = require('./helpers/require')('core/Link');
describe('Links', function(){
View
@@ -6,8 +6,6 @@ var should = require('should'),
rootpath = process.cwd() + '/',
path = require('path'),
exec = require('child_process').exec,
- jsc = require('jscoverage'),
- require = jsc.require(module), // rewrite require function
Module = require('./helpers/require')('core/Module');
describe('Modules', function(){
View
@@ -6,8 +6,6 @@ var should = require('should'),
rootpath = process.cwd() + '/',
path = require('path'),
exec = require('child_process').exec,
- jsc = require('jscoverage'),
- require = jsc.require(module), // rewrite require function
Themes = require('./helpers/require')('core/Themes');
describe('Themes', function(){
View
@@ -6,8 +6,6 @@ var should = require('should'),
rootpath = process.cwd() + '/',
path = require('path'),
exec = require('child_process').exec,
- jsc = require('jscoverage'),
- require = jsc.require(module), // rewrite require function
Utils = require('./helpers/require')('core/Utils');
describe('Utils', function(){

0 comments on commit 45b2367

Please sign in to comment.