Skip to content

Commit 78420c9

Browse files
deepjyoti30-stnamsnath
authored andcommitted
Skip thirdpartyemailpassword if not enabled in backend
1 parent 7aa5dc4 commit 78420c9

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

test/end-to-end/thirdpartyemailpassword.test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ import {
4949
backendHook,
5050
setupCoreApp,
5151
setupST,
52+
isThirdPartyEmailPasswordSupported,
5253
} from "../helpers";
5354
import {
5455
TEST_CLIENT_BASE_URL,
@@ -71,6 +72,10 @@ describe("SuperTokens Third Party Email Password", function () {
7172
const appConfig = {};
7273

7374
before(async function () {
75+
if (!(await isThirdPartyEmailPasswordSupported())) {
76+
this.skip();
77+
}
78+
7479
await backendHook("before");
7580
const coreUrl = await setupCoreApp();
7681
appConfig.coreUrl = coreUrl;

test/helpers.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -961,6 +961,15 @@ export async function isThirdPartyPasswordlessSupported() {
961961
return false;
962962
}
963963

964+
export async function isThirdPartyEmailPasswordSupported() {
965+
const features = await getFeatureFlags();
966+
if (features.includes("thirdpartyemailpassword")) {
967+
return true;
968+
}
969+
970+
return false;
971+
}
972+
964973
export async function isUserRolesSupported() {
965974
const features = await getFeatureFlags();
966975
if (!features.includes("userroles")) {

0 commit comments

Comments
 (0)