Skip to content

Commit 46c4263

Browse files
Skip thirdpartyemailpassword if not enabled in backend
1 parent 326e72c commit 46c4263

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
@@ -1003,6 +1003,15 @@ export async function isThirdPartyPasswordlessSupported() {
10031003
return false;
10041004
}
10051005

1006+
export async function isThirdPartyEmailPasswordSupported() {
1007+
const features = await getFeatureFlags();
1008+
if (features.includes("thirdpartyemailpassword")) {
1009+
return true;
1010+
}
1011+
1012+
return false;
1013+
}
1014+
10061015
export async function isUserRolesSupported() {
10071016
const features = await getFeatureFlags();
10081017
if (!features.includes("userroles")) {

0 commit comments

Comments
 (0)