X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Flib%2Fauthenticator.js;h=0e55094603e4e9eac0d718c8244633f56ba27891;hb=04c85a23b032c46ac0e5a1d85db34b9a7560c216;hp=75ae9a883547ba055f341a480104959d7fa50b7d;hpb=ff66dd49a1b54935a20ea6e15bd036b8acd5e170;p=squeep-authentication-module diff --git a/test/lib/authenticator.js b/test/lib/authenticator.js index 75ae9a8..0e55094 100644 --- a/test/lib/authenticator.js +++ b/test/lib/authenticator.js @@ -1,6 +1,3 @@ -/* eslint-env mocha */ -/* eslint-disable sonarjs/no-duplicate-string */ -/* eslint-disable jsdoc/require-jsdoc */ 'use strict'; const assert = require('node:assert'); @@ -53,6 +50,11 @@ describe('Authenticator', function () { authenticator = new Authenticator(stubLogger, stubDb, options); }); + it('covers invalid sameSite', function () { + options.authenticator.sessionCookieSameSite = 'Sometimes'; + assert.throws(() => new Authenticator(stubLogger, stubDb, options), RangeError); + }); + describe('createIdentifier', function () { let dbCtx; beforeEach(function () {