2010-12-05 00:20:34 +01:00
|
|
|
var common = require('../common');
|
|
|
|
var assert = require('assert');
|
2010-08-18 17:47:36 +02:00
|
|
|
|
2010-12-04 22:40:39 +01:00
|
|
|
common.globalCheck = false;
|
|
|
|
|
2010-12-05 20:15:30 +01:00
|
|
|
baseFoo = 'foo';
|
|
|
|
global.baseBar = 'bar';
|
2010-08-18 17:47:36 +02:00
|
|
|
|
2010-12-05 20:15:30 +01:00
|
|
|
assert.equal('foo', global.baseFoo, 'x -> global.x in base level not working');
|
2010-08-18 17:47:36 +02:00
|
|
|
|
2010-12-05 20:15:30 +01:00
|
|
|
assert.equal('bar', baseBar, 'global.x -> x in base level not working');
|
2010-08-18 17:47:36 +02:00
|
|
|
|
2010-12-05 20:15:30 +01:00
|
|
|
var module = require('../fixtures/global/plain'),
|
|
|
|
fooBar = module.fooBar;
|
2010-08-18 17:47:36 +02:00
|
|
|
|
2010-12-05 20:15:30 +01:00
|
|
|
assert.equal('foo', fooBar.foo, 'x -> global.x in sub level not working');
|
2010-08-18 17:47:36 +02:00
|
|
|
|
2010-12-05 20:15:30 +01:00
|
|
|
assert.equal('bar', fooBar.bar, 'global.x -> x in sub level not working');
|