Skip to content

Commit

Permalink
fix: move MAILSAC_API_KEY check inside the initialization logic (#2029)
Browse files Browse the repository at this point in the history
Co-authored-by: Enes <[email protected]>
  • Loading branch information
lukaisailovic and enesozturk authored Apr 15, 2024
1 parent 100b002 commit 1ea3762
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions apps/laboratory/tests/shared/fixtures/w3m-email-fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,16 @@ import { ModalPage } from '../pages/ModalPage'
import { ModalValidator } from '../validators/ModalValidator'
import { Email } from '../utils/email'

const mailsacApiKey = process.env['MAILSAC_API_KEY']
if (!mailsacApiKey) {
throw new Error('MAILSAC_API_KEY is not set')
}

export const testMEmail = base.extend<ModalFixture>({
library: ['wagmi', { option: true }],
modalPage: async ({ page, library, context }, use, testInfo) => {
const modalPage = new ModalPage(page, library, 'email')
await modalPage.load()

const mailsacApiKey = process.env['MAILSAC_API_KEY']
if (!mailsacApiKey) {
throw new Error('MAILSAC_API_KEY is not set')
}
const email = new Email(mailsacApiKey)
const tempEmail = email.getEmailAddressToUse(testInfo.parallelIndex)

Expand Down

0 comments on commit 1ea3762

Please sign in to comment.