Skip to content

tsuemura/codeceptjs-mailhog-helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

codeceptjs-mailhog-helper

codeceptjs-mailhog-helper is a CodeceptJS helper to add integrations for MailHog.

Installation

$ npm i codeceptjs-mailhog-helper --save

Configuration

codecept.conf.js

helpers: {
    MailHog: {
        require: 'codeceptjs-mailhog-helper',
        endpoint: 'http://localhost:8025/api/v2
    }
},

Options:

Usage

// Get latest EMail content by recipient address and subject
let content = await I.grabContentFromEmail(mailto, subject)

// get latest EMail content by recipient address, subject, body
let content = await I.grabContentFromEmail(mailto, subject, body)

// find URL string from latest EMail content
let url = await I.grabUrlFromEmail(mailto, subject)
let url = await I.grabUrlFromEmail(mailto, subject, body)

About

Test your email with Mailhog and CodeceptJS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published