if (acc === undefined && validTypesQuality[cur] !== 0.0) {
return cur;
}
+ // istanbul ignore next
// eslint-disable-next-line security/detect-object-injection
return validTypesQuality[acc] < validTypesQuality[cur] ? cur : acc;
}, undefined);
describe('enum', function () {
describe('ErrorResponse', function () {
- it('covers default', function () {
+ it('covers broken', function () {
const result = Enum.ErrorResponse.notPresent;
const expected = {
errorMessage: 'undefined error response \'notPresent\'',
};
assert.deepStrictEqual(result, expected);
});
+ it('covers success', function () {
+ const { statusCode } = Enum.ErrorResponse.ReallyForbidden;
+ const expected = 403;
+ assert.deepStrictEqual(statusCode, expected);
+ });
}); // ErrorResponse
});