From 54d7c580bdca5091bf5749058a16f1591bfcc34c Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 16 Feb 2016 17:46:44 -0800 Subject: [PATCH] Remove unneeded returns --- spec/api-protocol-spec.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/api-protocol-spec.js b/spec/api-protocol-spec.js index a7de60d..215868b 100644 --- a/spec/api-protocol-spec.js +++ b/spec/api-protocol-spec.js @@ -122,7 +122,7 @@ describe('protocol module', function() { if (error) { return done(error); } - return $.ajax({ + $.ajax({ url: protocolName + "://fake-host", success: function(data) { assert.equal(data, text); @@ -310,7 +310,7 @@ describe('protocol module', function() { if (error) { return done(error); } - return $.ajax({ + $.ajax({ url: protocolName + "://fake-host", success: function(data) { assert.equal(data, String(fileContent)); @@ -325,7 +325,7 @@ describe('protocol module', function() { it('sets Access-Control-Allow-Origin', function(done) { var handler = function(request, callback) { - return callback(filePath); + callback(filePath); }; protocol.registerFileProtocol(protocolName, handler, function(error) { if (error) { @@ -346,7 +346,7 @@ describe('protocol module', function() { }); it('sends object as response', function(done) { var handler = function(request, callback) { - return callback({ + callback({ path: filePath }); }; @@ -440,7 +440,7 @@ describe('protocol module', function() { res.end(text); server.close(); }); - return server.listen(0, '127.0.0.1', function() { + server.listen(0, '127.0.0.1', function() { var port = server.address().port; var url = "http://127.0.0.1:" + port; var handler = function(request, callback) { @@ -586,7 +586,7 @@ describe('protocol module', function() { var doubleHandler = function(request, callback) { try { callback(text); - return callback(); + callback(); } catch (error) { // Ignore error } -- 2.7.4