Skip to content

Commit 931ae39

Browse files
Skip thirdpartyemailpassword if not enabled in backend
1 parent 97a5321 commit 931ae39

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
@@ -51,6 +51,7 @@ import {
5151
backendHook,
5252
setupCoreApp,
5353
setupST,
54+
isThirdPartyEmailPasswordSupported,
5455
} from "../helpers";
5556
import {
5657
TEST_CLIENT_BASE_URL,
@@ -76,6 +77,10 @@ describe("SuperTokens Third Party Email Password", function () {
7677
const appConfig = {};
7778

7879
before(async function () {
80+
if (!(await isThirdPartyEmailPasswordSupported())) {
81+
this.skip();
82+
}
83+
7984
await backendHook("before");
8085
const coreUrl = await setupCoreApp();
8186
appConfig.coreUrl = coreUrl;

test/helpers.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -956,6 +956,15 @@ export async function isThirdPartyPasswordlessSupported() {
956956
return false;
957957
}
958958

959+
export async function isThirdPartyEmailPasswordSupported() {
960+
const features = await getFeatureFlags();
961+
if (features.includes("thirdpartyemailpassword")) {
962+
return true;
963+
}
964+
965+
return false;
966+
}
967+
959968
export async function isUserRolesSupported() {
960969
const features = await getFeatureFlags();
961970
if (!features.includes("userroles")) {

0 commit comments

Comments
 (0)