X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Flib%2Fauthenticator.js;h=0e55094603e4e9eac0d718c8244633f56ba27891;hb=04c85a23b032c46ac0e5a1d85db34b9a7560c216;hp=84ee1c5332564cec56b6b6e616c1f5b743a18475;hpb=8e6eeb4ff8fa853f200d3ed8a61ac31932371851;p=squeep-authentication-module diff --git a/test/lib/authenticator.js b/test/lib/authenticator.js index 84ee1c5..0e55094 100644 --- a/test/lib/authenticator.js +++ b/test/lib/authenticator.js @@ -1,9 +1,6 @@ -/* eslint-env mocha */ -/* eslint-disable sonarjs/no-duplicate-string */ -/* eslint-disable jsdoc/require-jsdoc */ 'use strict'; -const assert = require('assert'); +const assert = require('node:assert'); const sinon = require('sinon'); const Authenticator = require('../../lib/authenticator'); const stubLogger = require('../stub-logger'); @@ -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 () {