'use strict';
/* eslint-env node, mocha */

var expect = require('must');
var subject = require('../index');
var sinon = require('sinon');
var $ = require('./fixtures');

describe('-- functionality --', function() {
	describe('spec file', function() {
		it('should be found', function() {
			expect(true).to.be.true();
		});
	});

	var instance;
	beforeEach(function() {
		instance = subject.create();
	});
	
	describe('wrapped async methods', function() {
		it('should pass all parameters to async serial pre middleware; #11', function(done) {
			var passed;
			var a = 1;
			var b = "b";
			instance.test = function(a, b, done) {
				done();
			};
			instance.addHooks('test')
				.pre('test', function(a, b, next) {
					passed = [a, b];
					next();
				})
				.test(a, b, function() {
					expect(passed).to.eql([a, b]);
					done();
				});
		});
		it('should pass all parameters to async parallel pre middleware; #11', function(done) {
			var passed;
			var a = 1;
			var b = "b";
			instance.test = function(a, b, done) {
				done();
			};
			instance.addHooks('test')
				.pre('test', function(a, b, next, done) {
					passed = [a, b];
					next();
					done();
				})
				.test(a, b, function() {
					expect(passed).to.eql([a, b]);
					done();
				});
		});
		it('should pass all parameters to sync pre middleware; #11', function(done) {
			var passed;
			var a = 1;
			var b = "b";
			instance.test = function(a, b, done) {
				done();
			};
			instance.addHooks('test')
				.pre('test', function(a, b) {
					passed = [a, b];
				})
				.test(a, b, function() {
					expect(passed).to.eql([a, b]);
					done();
				});
		});
		it('should pass all parameters to async serial post middleware; #11', function(done) {
			var passed;
			var a = 1;
			var b = "b";
			instance.test = function(a, b, done) {
				done();
			};
			instance.addHooks('test')
				.post('test', function(a, b, next) {
					passed = [a, b];
					next();
				})
				.test(a, b, function() {
					expect(passed).to.eql([a, b]);
					done();
				});
		});
		it('should pass all parameters to async parallel post middleware; #11', function(done) {
			var passed;
			var a = 1;
			var b = "b";
			instance.test = function(a, b, done) {
				done();
			};
			instance.addHooks('test')
				.post('test', function(a, b, next, done) {
					passed = [a, b];
					next();
					done();
				})
				.test(a, b, function() {
					expect(passed).to.eql([a, b]);
					done();
				});
		});
		it('should pass all parameters to sync post middleware; #11', function(done) {
			var passed;
			var a = 1;
			var b = "b";
			instance.test = function(a, b, done) {
				done();
			};
			instance.addHooks('test')
				.post('test', function(a, b) {
					passed = [a, b];
				})
				.test(a, b, function() {
					expect(passed).to.eql([a, b]);
					done();
				});
		});
	});
	describe('wrapped sync methods', function() {
		it('should pass all parameters to sync pre middleware; #11', function() {
			var passed;
			var a = 1;
			var b = "b";
			instance.test = function(a, b) {
			};
			instance.addSyncHooks('test')
				.pre('test', function(a, b) {
					passed = [a, b];
				})
				.test(a, b);
			expect(passed).to.eql([a, b]);
		});
		it('should pass all parameters to sync post middleware; #11', function() {
			var passed;
			var a = 1;
			var b = "b";
			instance.test = function(a, b) {
			};
			instance.addSyncHooks('test')
				.post('test', function(a, b) {
					passed = [a, b];
				})
				.test(a, b);
			expect(passed).to.eql([a, b]);
		});
	});
	
});

@@ -105,69 +105,8 @@
 x');
-%0Avar sinon = require('sinon');%0Avar $ = require('./fixtures');
 %0A%0Ade
@@ -509,35 +509,35 @@
 = 1;%0A%09%09%09var b = 
-%22b%22
+'b'
 ;%0A%09%09%09instance.te
@@ -907,35 +907,35 @@
 = 1;%0A%09%09%09var b = 
-%22b%22
+'b'
 ;%0A%09%09%09instance.te
@@ -1314,35 +1314,35 @@
 = 1;%0A%09%09%09var b = 
-%22b%22
+'b'
 ;%0A%09%09%09instance.te
@@ -1692,35 +1692,35 @@
 = 1;%0A%09%09%09var b = 
-%22b%22
+'b'
 ;%0A%09%09%09instance.te
@@ -2092,35 +2092,35 @@
 = 1;%0A%09%09%09var b = 
-%22b%22
+'b'
 ;%0A%09%09%09instance.te
@@ -2501,35 +2501,35 @@
 = 1;%0A%09%09%09var b = 
-%22b%22
+'b'
 ;%0A%09%09%09instance.te
@@ -2919,35 +2919,35 @@
 = 1;%0A%09%09%09var b = 
-%22b%22
+'b'
 ;%0A%09%09%09instance.te
@@ -2952,36 +2952,32 @@
 test = function(
-a, b
 ) %7B%0A%09%09%09%7D;%0A%09%09%09ins
@@ -3244,11 +3244,11 @@
 b = 
-%22b%22
+'b'
 ;%0A%09%09
@@ -3269,28 +3269,24 @@
  = function(
-a, b
 ) %7B%0A%09%09%09%7D;%0A%09%09

Fix linting errors