UNPKG

temp-disposable-email

Version:

Generating Temporary email address for testing, retrieving email from the temporary email address

25 lines 769 B
import { test as base } from '@playwright/test'; import { generateEmail, getRecentEmail, getVerificationCode, } from './index'; /** * Extended Playwright test with email helper fixtures. * * @example * import { test, expect } from 'temp-disposable-email/playwright'; * * test('sign up flow', async ({ page, emailHelper }) => { * const { emailAddress } = await emailHelper.generateEmail(); * // ... your test code * }); */ export const test = base.extend({ // eslint-disable-next-line no-empty-pattern emailHelper: async ({}, use) => { await use({ generateEmail, getRecentEmail, getVerificationCode, }); }, }); export { expect } from '@playwright/test'; //# sourceMappingURL=playwright.js.map