Skip to content

Commit

Permalink
fix test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
jgrayson676 committed Oct 14, 2024
1 parent 04e1e8e commit 87399fe
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/http-error.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class HttpError extends Error {
this.body = body;
this.message = 'integration terminated early';
this.name = 'HttpError';
Error.captureStackTrace(this, arguments.callee);
Error.captureStackTrace(this);
}
}

Expand Down
5 changes: 1 addition & 4 deletions lib/test/types.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
/*
* DS102: Remove unnecessary code created because of implicit returns
*/
const types = require('leadconduit-types');
const flat = require('flat');

module.exports.parser = function(requestVars = []) {
const typeLookup = {};

for (let requestVar in requestVars) {
for (let requestVar of requestVars) {
typeLookup[requestVar.name] = types[requestVar.type];
}

Expand Down
2 changes: 1 addition & 1 deletion test/http-error-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('HttpError', function() {
} catch (e) {
const stack = e.stack.split('\n');
assert.equal(stack[0], 'HttpError: integration terminated early');
return assert.match(stack[1], /at fxn.*test\/http\-error\-spec\.coffee\:/);
assert.match(stack[2], /at fxn.*test\/http\-error\-spec\.js\:/);
}
});

Expand Down
1 change: 0 additions & 1 deletion test/util-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ describe('Utility functions', function() {
invokeRequest();
} catch (error) {
err = error;
console.log(err);
assert.equal(err.status, 415);
assert.equal(err.body, 'The GET method is not allowed');
}
Expand Down

0 comments on commit 87399fe

Please sign in to comment.