Skip to content

Commit

Permalink
add-react-email-test
Browse files Browse the repository at this point in the history
  • Loading branch information
jackmahoney committed Oct 3, 2023
1 parent 23d0727 commit e051506
Show file tree
Hide file tree
Showing 15 changed files with 4,906 additions and 43 deletions.
3 changes: 3 additions & 0 deletions .build/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "module"
}
5 changes: 5 additions & 0 deletions .build/readme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ import * as fs from "fs";
import {join} from "path";
import glob from "fast-glob";
import Mustache from "mustache";
import path from 'path';
import { fileURLToPath } from 'url';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename)
const log = debug("scripts/readme");

(async function() {
Expand Down
15 changes: 14 additions & 1 deletion .build/shortcodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,17 @@
* ```
* Creates a shortcode in themes/ms/layouts/shortcodes that can be used in content
*/
import debug from "debug";
import * as fs from "fs";
import debug from "debug";
import {join} from "path";
import glob from "fast-glob";
import util from 'util';
import {exec} from 'child_process';
import path from 'path';
import { fileURLToPath } from 'url';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename)
const execAsync = util.promisify(exec);
const log = debug("scripts/shortcodes");

Expand Down Expand Up @@ -222,6 +226,15 @@ async function getFileTree(path: string): Promise<string> {
commentEnd: "//</gen>",
highlight: "dart",
},
{
paths: await files(
"/javascript-react-email/**/*.js",
"/javascript-react-email/**/*.jsx",
),
commentStart: "//<gen>",
commentEnd: "//</gen>",
highlight: "javascript",
},
{
paths: await files(
"/javascript-cypress-js/**/*.js",
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ See developer page for [more guides and documentation](https://www.mailslurp.com
- [javascript-cypress-mailslurp-plugin](./javascript-cypress-mailslurp-plugin)
- [javascript-cypress-sms-testing](./javascript-cypress-sms-testing)
- [javascript-jest-puppeteer](./javascript-jest-puppeteer)
- [javascript-react-email](./javascript-react-email)
- [javascript-testcafe](./javascript-testcafe)
- [javascript-webdriver-io](./javascript-webdriver-io)
- [kotlin-email-test-example](./kotlin-email-test-example)
Expand Down Expand Up @@ -61,6 +62,7 @@ See developer page for [more guides and documentation](https://www.mailslurp.com
- [sendgrid](./sendgrid)
- [shortcodes](./shortcodes)
- [swift-email-smtp-examples](./swift-email-smtp-examples)
- [telnet-imap-sh](./telnet-imap-sh)
- [visualbasic](./visualbasic)

## Running locally
Expand Down
2 changes: 2 additions & 0 deletions javascript-react-email/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
coverage
node_modules
11 changes: 11 additions & 0 deletions javascript-react-email/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
-include ../.env
.PHONY: test

node_modules:
npm install

docker:


test: node_modules
API_KEY=$(API_KEY) npm t
2 changes: 2 additions & 0 deletions javascript-react-email/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# React Email nodemailer end-to-end test example
How to test emails created with React Email using MailSlurp disposable email addresses.
Loading

0 comments on commit e051506

Please sign in to comment.