var antiglobal = require('../');

antiglobal.log = false;

module.exports = {
	'call without global additions': function(test) {
		test.ok(antiglobal());
		test.done();
	},

	'call after a global addition': function(test) {
		global.AAA = 'aaa';

		test.ok(antiglobal('AAA'));
		test.done();
	},

	'call after two global additions': function(test) {
		global.BBB = 'bbb';
		global.CCC = 'ccc';

		test.ok(antiglobal('BBB', 'CCC'));
		test.done();
	},

	'TODO: should fail coño': function(test) {
		console.log(global.AAA);
		delete global.AAA;

		test.ok(antiglobal());
		test.done();
	},

	'antiglobal.throw=true works': function(test) {
		antiglobal.throw = true;

		global.DDD = 'ddd';
		global.EEE = 'eee';

		test.throws(function() {
			antiglobal('DDD');
		}, Error);

		antiglobal.throw = false;
		test.done();
	},

	'final call without global addition': function(test) {
		test.ok(antiglobal());
		test.done();
	}
};

@@ -449,146 +449,8 @@
 %7D,%0A%0A
-%09'TODO: should fail co%C3%B1o': function(test) %7B%0A%09%09console.log(global.AAA);%0A%09%09delete global.AAA;%0A%0A%09%09test.ok(antiglobal());%0A%09%09test.done();%0A%09%7D,%0A%0A
 %09'an

remove bad test