<commit_before>
var inject = function() {
	return {
		addConfigurationMultiElement: function(l, r) {
			inject.l = l;
			inject.r = r;
		}
	};
}
var valueOf = java.lang.String.valueOf;

var mocks = {
	'configuration-support' : {
		makeStringProperty:function() {}
	}
};

var require = function(id) {
	return mocks[id];
}

describe("makeSetter", function() {
	
	beforeEach(function() {
		inject.l = inject.r = null;
	});
	
	describe("to", function() {
		
		var ms;
		
		beforeEach(function() {
			ms = makeSetter(GET, route);
		})
		
		it("adds Routes to the collector in the correct key", function() {
			var beef = "/beef";
			var chief = "/chief";
			ms(beef).to(chief);
			
			expect(inject.l).toBe(base + 'routes');
			expect(inject.r).toBeDefined();
			expect(inject.r.method()).toEqual(GET);
			expect(inject.r.uri()).toEqual(valueOf(beef));
			expect(inject.r.destination()).toEqual(valueOf(chief));<commit_msg>testing some more<commit_after>
var inject = function() {
	return {
		addConfigurationMultiElement: function(l, r) {
			inject.l = l;
			inject.r = r;
		}
	};
}
var valueOf = java.lang.String.valueOf;
var bases = [];
var names = [];
var stringProperty = function() {}
var mocks = {
	'configuration-support' : {
		makeStringProperty:function(base, name) {
			bases.push(base);
			names.push(name);
			return stringProperty;
		}
	}
};

var require = function(id) {
	return mocks[id];
}

describe("exports", function() {
	
	describe("welcomeFile", function() {
		
		it("sets up using makeStringProperty", function() {
			expect(bases[0]).toBe(base);
			expect(names[0]).toBe("welcomeFile");
		});
		
		it("delegates to stringProperty", function() {
			
			expect(module.exports.welcomeFile).toBe(stringProperty);
		});
	});
	
	describe("route", function() {
		
		it("contains routing methods", function() {
			var r = module.exports.route;
			expect(r.get).toBeDefined();
			expect(r.GET).toBeDefined();
			expect(r.post).toBeDefined();
			expect(r.POST).toBeDefined();
			expect(r.put).toBeDefined();
			expect(r.PUT).toBeDefined();
			expect(r.del).toBeDefined();
			expect(r.DELETE).toBeDefined();
		});
	});
	
});

describe("makeSetter", function() {
	
	beforeEach(function() {
		inject.l = inject.r = null;
	});
	
	describe("to", function() {
		
		var ms;
		
		beforeEach(function() {
			ms = makeSetter(GET, route);
		})
		
		it("adds Routes to the collector in the correct key", function() {
			var beef = "/beef";
			var chief = "/chief";
			ms(beef).to(chief);
			
			expect(inject.l).toBe(base + 'routes');
			expect(inject.r).toBeDefined();
			expect(inject.r.method()).toEqual(GET);
			expect(inject.r.uri()).toEqual(valueOf(beef));
			expect(inject.r.destination()).toEqual(valueOf(chief));
{'fraction_non_alphanumeric': 0.18211920529801323, 'fraction_numerical': 0.0007358351729212656, 'mean_word_length': 3.8294849023090585, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2018041', 'n_tokens_mistral': 1075, 'n_tokens_neox': 917, 'n_words': 168}