allow config of session cookie sameSite value
[squeep-authentication-module] / test / lib / authenticator.js
index 75ae9a883547ba055f341a480104959d7fa50b7d..4768e0d5f94f226c5289361893c96ec9c79f134a 100644 (file)
@@ -53,6 +53,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 () {