minor coverage cleanup
authorJustin Wind <justin.wind+git@gmail.com>
Thu, 20 Jul 2023 22:58:51 +0000 (15:58 -0700)
committerJustin Wind <justin.wind+git@gmail.com>
Thu, 20 Jul 2023 22:58:51 +0000 (15:58 -0700)
lib/content-negotiation.js
test/lib/enum.js

index 440137448895b393fe2d7dc0903d9086a60347a9..e78fe359303ae8bf2eb06902763ea2297f1baae4 100644 (file)
@@ -102,6 +102,7 @@ class ContentNegotiation {
       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);
index 0a86ec59e1518c7e534aa49f5750a2fbb06060db..bdd353f358ee1a7b8e9a9c1823f5e0f645a45948 100644 (file)
@@ -9,13 +9,18 @@ const Enum = require('../../lib/enum');
 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
 
 });