<commit_before>var spawn = require('child_process').spawn;


var BIN = './src/index.js';


describe('--config without 1', function() {

	it('should be 1 on a failed test without the failing feature', function(done) {
		this.timeout(30 * 1000);

		var config = {
			without: [1]
		};

		var subject = spawn(BIN, [ '--config', JSON.stringify(config), 'test/resources/FailingSuite' ]);

		subject.on('exit', function(code) {
			code.should.equal(0);
			done();
		});
	});

	it('should fail on a successful test without its only feature', function(done) {
		this.timeout(30 * 1000);

		var config = {
			without: [1]
		};

		var subject = spawn(BIN, [ '--config', JSON.stringify(config), 'test/resources/SucceedingSuite' ]);

		subject.on('exit', function(code) {
			code.should.not.equal(0);
			done();
		});
	});

});<commit_msg>Add integration test to assert that it fails ignoring "not a feature"<commit_after>var spawn = require('child_process').spawn;


var BIN = './src/index.js';


describe('--config without 1', function() {

	it('should be 1 on a failed test without the failing feature', function(done) {
		this.timeout(30 * 1000);

		var config = {
			without: [1]
		};

		var subject = spawn(BIN, [ '--config', JSON.stringify(config), 'test/resources/FailingSuite' ]);

		subject.on('exit', function(code) {
			code.should.equal(0);
			done();
		});
	});

	it('should fail on a successful test without its only feature', function(done) {
		this.timeout(30 * 1000);

		var config = {
			without: [1]
		};

		var subject = spawn(BIN, [ '--config', JSON.stringify(config), 'test/resources/SucceedingSuite' ]);

		subject.on('exit', function(code) {
			code.should.not.equal(0);
			done();
		});
	});

	describe('without a feature that does not exist', function() {
		var subject,
			message;

		before(function() {
			var config = {
				without: [5555]
			};

			subject = spawn(BIN, [ '--config', JSON.stringify(config), 'test/resources/SucceedingSuite' ]);

			subject.stderr.on('data', function(data) {
				message = data.toString();
			});
		});

		it('should fail', function(done) {
			this.timeout(10000);

			subject.on('exit', function(code) {
				code.should.not.equal(0);
				done();
			});
		});

		it('should give details', function() {
			message.should.match(/could not be found/);
		});
	});

});
{'fraction_non_alphanumeric': 0.18213206732844195, 'fraction_numerical': 0.01985325852395339, 'mean_word_length': 3.562992125984252, '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': '2542598', 'n_tokens_mistral': 902, 'n_tokens_neox': 750, 'n_words': 182}