Remove unneeded returns
This commit is contained in:
parent
8a9395101e
commit
54d7c580bd
1 changed files with 6 additions and 6 deletions
|
@ -122,7 +122,7 @@ describe('protocol module', function() {
|
||||||
if (error) {
|
if (error) {
|
||||||
return done(error);
|
return done(error);
|
||||||
}
|
}
|
||||||
return $.ajax({
|
$.ajax({
|
||||||
url: protocolName + "://fake-host",
|
url: protocolName + "://fake-host",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
assert.equal(data, text);
|
assert.equal(data, text);
|
||||||
|
@ -310,7 +310,7 @@ describe('protocol module', function() {
|
||||||
if (error) {
|
if (error) {
|
||||||
return done(error);
|
return done(error);
|
||||||
}
|
}
|
||||||
return $.ajax({
|
$.ajax({
|
||||||
url: protocolName + "://fake-host",
|
url: protocolName + "://fake-host",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
assert.equal(data, String(fileContent));
|
assert.equal(data, String(fileContent));
|
||||||
|
@ -325,7 +325,7 @@ describe('protocol module', function() {
|
||||||
|
|
||||||
it('sets Access-Control-Allow-Origin', function(done) {
|
it('sets Access-Control-Allow-Origin', function(done) {
|
||||||
var handler = function(request, callback) {
|
var handler = function(request, callback) {
|
||||||
return callback(filePath);
|
callback(filePath);
|
||||||
};
|
};
|
||||||
protocol.registerFileProtocol(protocolName, handler, function(error) {
|
protocol.registerFileProtocol(protocolName, handler, function(error) {
|
||||||
if (error) {
|
if (error) {
|
||||||
|
@ -346,7 +346,7 @@ describe('protocol module', function() {
|
||||||
});
|
});
|
||||||
it('sends object as response', function(done) {
|
it('sends object as response', function(done) {
|
||||||
var handler = function(request, callback) {
|
var handler = function(request, callback) {
|
||||||
return callback({
|
callback({
|
||||||
path: filePath
|
path: filePath
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -440,7 +440,7 @@ describe('protocol module', function() {
|
||||||
res.end(text);
|
res.end(text);
|
||||||
server.close();
|
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 port = server.address().port;
|
||||||
var url = "http://127.0.0.1:" + port;
|
var url = "http://127.0.0.1:" + port;
|
||||||
var handler = function(request, callback) {
|
var handler = function(request, callback) {
|
||||||
|
@ -586,7 +586,7 @@ describe('protocol module', function() {
|
||||||
var doubleHandler = function(request, callback) {
|
var doubleHandler = function(request, callback) {
|
||||||
try {
|
try {
|
||||||
callback(text);
|
callback(text);
|
||||||
return callback();
|
callback();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// Ignore error
|
// Ignore error
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue