Skip to content

Commit

Permalink
incorporate review feedback - rename test vars
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmyjames committed Jul 23, 2020
1 parent 6cea39d commit f053dec
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/errors.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ describe('Errors', function() {
describe('sanitizeErrorRequestData', function() {
describe('when passed in error is missing request data and headers', function() {
var error = { response: { request: {} } };
var sanitizedError = errors.sanitizeErrorRequestData(error);
var redactedError = errors.sanitizeErrorRequestData(error);

it('should return error', function() {
expect(sanitizedError).to.equal(error);
expect(redactedError).to.equal(error);
});
});

Expand All @@ -25,8 +25,8 @@ describe('Errors', function() {
}
}
};
const sanitizedError = errors.sanitizeErrorRequestData(error);
const sanitizedData = sanitizedError.response.request._data;
const redactedError = errors.sanitizeErrorRequestData(error);
const sanitizedData = redactedError.response.request._data;

it('should return [REDACTED] for DATA_SECRET', function() {
expect(sanitizedData.DATA_SECRET).to.equal('[REDACTED]');
Expand All @@ -49,8 +49,8 @@ describe('Errors', function() {
}
}
};
const sanitizedError = errors.sanitizeErrorRequestData(error);
const sanitizedData = sanitizedError.response.request._header;
const redactedError = errors.sanitizeErrorRequestData(error);
const sanitizedData = redactedError.response.request._header;

it('should return [REDACTED] for authorization', function() {
expect(sanitizedData.authorization).to.equal('[REDACTED]');
Expand Down Expand Up @@ -100,7 +100,7 @@ describe('Errors', function() {
expect(sanitizedError.originalError).to.eql(originalError);
});

it('should sanitize the original error sensitive information', function() {
it('should redact the original error sensitive information', function() {
expect(sanitizedError.originalError.response.request._data.secret).to.eql('[REDACTED]');
});

Expand Down

0 comments on commit f053dec

Please sign in to comment.