Skip to content

Commit 5003aee

Browse files
committed
fix: awaits setupST calls
1 parent 49d3f0d commit 5003aee

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

test/end-to-end/mfa.signin.test.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ describe("SuperTokens SignIn w/ MFA", function () {
113113
it("sign in with email-otp (auto-setup)", async function () {
114114
const email = await getTestEmail();
115115

116-
setupST({
116+
await setupST({
117117
...appConfig,
118118
mfaInfo: {
119119
requirements: ["otp-email"],
@@ -139,7 +139,7 @@ describe("SuperTokens SignIn w/ MFA", function () {
139139
const email = await getTestEmail();
140140
const phoneNumber = getTestPhoneNumber();
141141

142-
setupST({
142+
await setupST({
143143
...appConfig,
144144
mfaInfo: {
145145
requirements: [{ oneOf: ["otp-email", "otp-phone"] }],
@@ -163,7 +163,7 @@ describe("SuperTokens SignIn w/ MFA", function () {
163163
});
164164

165165
it("set up otp-email and sign-in", async function () {
166-
setupST({
166+
await setupST({
167167
...appConfig,
168168
mfaInfo: {
169169
requirements: [],
@@ -179,7 +179,7 @@ describe("SuperTokens SignIn w/ MFA", function () {
179179

180180
await logout(page);
181181

182-
setupST({
182+
await setupST({
183183
...appConfig,
184184
mfaInfo: {
185185
requirements: [{ oneOf: ["otp-email"] }],
@@ -203,15 +203,15 @@ describe("SuperTokens SignIn w/ MFA", function () {
203203
});
204204

205205
it("set up totp and sign-in", async function () {
206-
setupST({
206+
await setupST({
207207
...appConfig,
208208
mfaInfo: {
209209
requirements: [],
210210
},
211211
});
212212
const email = await getTestEmail();
213213

214-
setupST({
214+
await setupST({
215215
...appConfig,
216216
mfaInfo: {
217217
requirements: [{ oneOf: ["otp-email", "totp"] }],
@@ -245,7 +245,7 @@ describe("SuperTokens SignIn w/ MFA", function () {
245245

246246
it("should show access denied if the only next option is an unknown factor id", async () => {
247247
const email = await getTestEmail();
248-
setupST({
248+
await setupST({
249249
...appConfig,
250250
mfaInfo: {
251251
requirements: ["unknown"],
@@ -258,7 +258,7 @@ describe("SuperTokens SignIn w/ MFA", function () {
258258
});
259259

260260
it("should throw error if there are no valid next options", async () => {
261-
setupST({
261+
await setupST({
262262
...appConfig,
263263
mfaInfo: {
264264
requirements: ["unknown"],

0 commit comments

Comments
 (0)