Skip to content

nicktrn/playwright-mail-tester

Repository files navigation

Playwright Mail Tester

Purpose

Provide simple, fast, local-first e2e email testing with full parallel support.

Design

sequenceDiagram
    participant Client
    box Server
    participant WebSocket
    participant SMTP
    end
    participant Mailer

    Client-)WebSocket: subscribe
    Note right of Client: namespaced
    Mailer-)SMTP: send mail
    SMTP->>+WebSocket: get subscribers
    WebSocket-->>-SMTP: subscribers[ ]
    loop every subscriber
    SMTP-)WebSocket: forward mail
    end
    WebSocket-)Client: forward mail
    Note right of Client: namespaced

Demo

[ ! -f .env ] && cp .env.example .env
yarn && yarn test

Optional:

  • adjust workers with the --workers <number> flag
  • set DEBUG=1 for a nice wall of text (and useful debugging info)
  • change SMTP_SERVER_PORT to avoid collisions

Built with

About

fully parallel, local e2e email testing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published