From 43be56e5619fe5be2a2116ead78d891356a6ead4 Mon Sep 17 00:00:00 2001 From: David Bashford Date: Fri, 13 Jan 2017 10:35:57 -0500 Subject: [PATCH] format file --- test/invalid_calls_test.js | 88 +++++++++++++++++++------------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/test/invalid_calls_test.js b/test/invalid_calls_test.js index 0d8e6af..3375170 100644 --- a/test/invalid_calls_test.js +++ b/test/invalid_calls_test.js @@ -1,87 +1,87 @@ -var test = function(done) { - return function(error, text) { - expect(text).to.be.null; - expect(error).to.be.an('object'); - expect(error.message).to.be.an('string'); - expect(error.message).to.eql("Incorrect parameters passed to textract."); +/* global fromUrl */ + +var test = function( done ) { + return function( error, text ) { + expect( text ).to.be.null; + expect( error ).to.be.an( 'object' ); + expect( error.message ).to.be.an( 'string' ); + expect( error.message ).to.eql( 'Incorrect parameters passed to textract.' ); done(); - } -} + }; +}; -var pathTests = function(testFunction) { +var pathTests = function( testFunction ) { var funct; - beforeEach(function() { + beforeEach( function() { funct = testFunction(); }); - it('should return an error 1', function(done) { - funct(test(done)); + it( 'should return an error 1', function( done ) { + funct( test( done ) ); }); - it('should return an error 2', function(done) { - funct(false, test(done)); + it( 'should return an error 2', function( done ) { + funct( false, test( done ) ); }); - it('should return an error 3', function(done) { - funct(test(done), false); + it( 'should return an error 3', function( done ) { + funct( test( done ), false ); }); - it('should return an error 4', function(done) { - funct("foo", test(done), false); + it( 'should return an error 4', function( done ) { + funct( 'foo', test( done ), false ); }); - it('should return an error 5', function(done) { - funct("foo", {}, false, test(done)); + it( 'should return an error 5', function( done ) { + funct( 'foo', {}, false, test( done ) ); }); }; -var bufferTests = function(testFunction) { +var bufferTests = function( testFunction ) { var funct; - beforeEach(function() { + beforeEach( function() { funct = testFunction(); }); - it('should return an error 1', function(done) { - funct(test(done)); + it( 'should return an error 1', function( done ) { + funct( test( done ) ); }); - it('should return an error 2', function(done) { - funct(false, test(done)); + it( 'should return an error 2', function( done ) { + funct( false, test( done ) ); }); - it('should return an error 3', function(done) { - funct(test(done), false); + it( 'should return an error 3', function( done ) { + funct( test( done ), false ); }); - it('should return an error 4', function(done) { - funct("foo", test(done), false); + it( 'should return an error 4', function( done ) { + funct( 'foo', test( done ), false ); }); - it('should return an error 5', function(done) { - funct("foo", {}, false, test(done)); + it( 'should return an error 5', function( done ) { + funct( 'foo', {}, false, test( done ) ); }); }; -describe('when passed incorrect parameters', function() { - - describe("fromFileWithPath", function() { - pathTests(function(){ return global.fromFileWithPath }, false); +describe( 'when passed incorrect parameters', function() { + describe( 'fromFileWithPath', function() { + pathTests( function() { return global.fromFileWithPath; }, false ); }); - describe("fromFileWithMimeAndPath", function() { - pathTests(function(){ return global.fromFileWithMimeAndPath }, false); + describe( 'fromFileWithMimeAndPath', function() { + pathTests( function() { return global.fromFileWithMimeAndPath; }, false ); }); - describe("fromBufferWithName", function() { - bufferTests(function(){ return global.fromBufferWithName }, false); + describe( 'fromBufferWithName', function() { + bufferTests( function() { return global.fromBufferWithName; }, false ); }); - describe("fromBufferWithMime", function() { - bufferTests(function(){ return global.fromBufferWithMime }, false); + describe( 'fromBufferWithMime', function() { + bufferTests( function() { return global.fromBufferWithMime; }, false ); }); - -}); \ No newline at end of file +});