mirror of
https://github.com/flynx/test.js.git
synced 2025-10-28 10:20:09 +00:00
tweaking...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
c68f30cf99
commit
f23cba543a
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ig-test",
|
"name": "ig-test",
|
||||||
"version": "1.3.3",
|
"version": "1.3.4",
|
||||||
"description": "experimental test runner....",
|
"description": "experimental test runner....",
|
||||||
"main": "test.js",
|
"main": "test.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
|||||||
12
test.js
12
test.js
@ -612,9 +612,15 @@ function(default_files, tests){
|
|||||||
tests = default_files
|
tests = default_files
|
||||||
default_files = undefined }
|
default_files = undefined }
|
||||||
|
|
||||||
// patch require.cache to make the clients load the global module...
|
// patch require.cache...
|
||||||
var local = path.join(process.cwd(), 'node_modules', 'ig-test', 'test.js')
|
// NOTE: this will make all the client scripts see the global module
|
||||||
require.cache[local] = require.cache[require.main.filename]
|
// instead of local stuff...
|
||||||
|
if(typeof(__filename) != 'undefined'
|
||||||
|
&& __filename == (require.main || {}).filename){
|
||||||
|
// XXX is guessing this the correct way to do this???
|
||||||
|
// ...should we use glog.sync(process.cwd()+'/**/ig-test/test.js') instead???
|
||||||
|
var local = path.join(process.cwd(), 'node_modules', 'ig-test', 'test.js')
|
||||||
|
require.cache[local] = require.cache[require.main.filename] }
|
||||||
|
|
||||||
var stats = {}
|
var stats = {}
|
||||||
var tests = tests
|
var tests = tests
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user