Skip to content

Commit

Permalink
Add test coverage for initialize() of saml.ts (#327)
Browse files Browse the repository at this point in the history
  • Loading branch information
kg0r0 committed Sep 30, 2023
1 parent cbe102a commit e691ccf
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/samlTests.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -448,5 +448,19 @@ describe("saml.ts", function () {
);
});
});
describe("initialize", function () {
it("should throw a error when SamlOptions is not set", function () {
expect(() => {
const samlObj = new SAML({
callbackUrl: "http://localhost/saml/consume",
cert: FAKE_CERT,
issuer: "onesaml_login",
audience: false,
});
// eslint-disable-next-line @typescript-eslint/no-explicit-any
samlObj.initialize(undefined as any);
}).to.throw("SamlOptions required on construction");
});
});
});
});

0 comments on commit e691ccf

Please sign in to comment.