<commit_before>(function (buster, require) {

var assert, refute, compose, undef;

assert = buster.assert;
refute = buster.refute;

compose = require('cola/network/strategy/compose');

buster.testCase('cola/network/strategy/compose', {

	'should return function': function () {
		assert.isFunction(compose([]));
	},
	'should call each of the strategies': function () {
		var strategies;

		strategies = [
			this.spy(),
			this.spy(),
			this.spy()
		];

		compose(strategies)();

		assert.called(strategies[0]);
		assert.called(strategies[1]);
		assert.called(strategies[2]);
	},
	'should call the strategies in order': function () {
		var strategies;

		strategies = [
			this.spy(),
			this.spy(),
			this.spy()
		];

		compose(strategies)();

		assert.callOrder(strategies[0], strategies[1], strategies[2]);
	},
	'should not proceed past strategy that returns false': function () {
		var strategies;

		strategies = [
			this.spy(),
			function () { return false; },
			this.spy()
		];

		compose(strategies)();

		assert.called(strategies[0])
		refute.called(strategies[2]);
	}

});
})( require('buster'), require );
<commit_msg>check for return value<commit_after>(function (buster, require) {

var assert, refute, compose, undef;

assert = buster.assert;
refute = buster.refute;

compose = require('cola/network/strategy/compose');

buster.testCase('cola/network/strategy/compose', {

	'should return function': function () {
		assert.isFunction(compose([]));
	},
	'should call each of the strategies': function () {
		var strategies;

		strategies = [
			this.spy(),
			this.spy(),
			this.spy()
		];

		compose(strategies)();

		assert.called(strategies[0]);
		assert.called(strategies[1]);
		assert.called(strategies[2]);
	},
	'should call the strategies in order': function () {
		var strategies;

		strategies = [
			this.spy(),
			this.spy(),
			this.spy()
		];

		compose(strategies)();

		assert.callOrder(strategies[0], strategies[1], strategies[2]);
	},
	'should not proceed past strategy that returns false': function () {
		var strategies;

		strategies = [
			this.spy(),
			function () { return false; },
			this.spy()
		];

		refute(compose(strategies)());

		assert.called(strategies[0])
		refute.called(strategies[2]);
	}

});
})( require('buster'), require );

{'fraction_non_alphanumeric': 0.17067833698030635, 'fraction_numerical': 0.00700218818380744, 'mean_word_length': 4.148648648648648, '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': '950935', 'n_tokens_mistral': 891, 'n_tokens_neox': 802, 'n_words': 155}