{"size": 623, "ext": "js", "max_stars_repo_path": "test/test.js", "max_stars_repo_name": "x25/parallel-js", "max_stars_repo_stars_event_min_datetime": "2016-01-18T11:03:17.000Z", "max_stars_repo_stars_event_max_datetime": "2016-01-18T11:03:17.000Z", "max_issues_repo_path": "test/test.js", "max_issues_repo_name": "x25/parallel-js", "max_issues_repo_issues_event_min_datetime": "2016-07-14T16:59:29.000Z", "max_issues_repo_issues_event_max_datetime": "2016-07-14T16:59:29.000Z", "max_forks_repo_path": "test/test.js", "max_forks_repo_name": "x25/parallel-js", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 15.1951219512, "max_line_length": 44, "alphanum_fraction": 0.5232744783}
var Processor = require('./..').Processor;

module.exports = {
	setUp: function (callback) {
		callback();
	},

	tearDown: function (callback) {
		// clean up
		callback();
	},

	testProcessor: function (test) {
		test.expect(3);

		var n = 0;

		var task = function (next, data) {

			setTimeout(function() {
				if (!n) {
					test.equal('data' + (++n), data);
					next('error');
				} else {
					test.equal('data' + (n++), data);
					next();

					if (n === 3) {
						test.done();
					}
				}
			}, 100);
		};

		var processor = new Processor(task, 1, 1);

		processor.run('data1');
		processor.run('data2');
	}
};
