<commit_before>var assert = require('assert')
	, request = require('supertest')
	, express = require('express')
	, or = require('../.').or 


describe('the or() method', function () {

	describe('when invoked with middleware isTrue, and isTrue', function () {

		app = express();
		app.get('/test', or(isTrue, isTrue), done);

		it('then should invoke our last handler with the value of true', function (done) {

			request(app)
				.get('/test')
				.end(function (err, res) {
					assert.equal(res.body.ok, true);
					done();
				});

		});

	});

});

function isTrue (req, res, next) {
	next(true);
}

function done (err, req, res) {
	if (err instanceof Error) return res.json({ok:false, error:err})
	req.json({ok:true});
}
<commit_msg>got the second test to pass or(true, false) => true<commit_after>var assert = require('assert')
	, request = require('supertest')
	, express = require('express')
	, or = require('../.').or 


describe('the or() method', function () {

	describe('when invoked with middleware isTrue, and isTrue', function () {

		app = express();
		app.get('/test', or(isTrue, isTrue), done);

		it('then should invoke our last handler with the value of true', function (done) {

			request(app)
				.get('/test')
				.end(function (err, res) {
					assert.equal(res.body.ok, true);
					done();
				});

		});

	});

	describe('when invoked with middleware isTrue, and isFalse', function () {

		app = express();
		app.get('/test', or(isTrue, isFalse), done);

		it('then should invoke our last handler with the value of true', function (done) {

			request(app)
				.get('/test')
				.end(function (err, res) {
					assert.equal(res.body.ok, true);
					done();
				});

		});

	});

});

function isTrue (req, res, next) {
	next(true);
}

function isFalse (req, res, next) {
	next(false);
}

function done (err, req, res) {
	if (err instanceof Error) return res.json({ok:false, error:err})
	req.json({ok:true});
}

{'fraction_non_alphanumeric': 0.18341061308603812, 'fraction_numerical': 0.0, 'mean_word_length': 3.5586854460093895, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '3539841', 'n_tokens_mistral': 733, 'n_tokens_neox': 636, 'n_words': 183}