Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 96ec2c7d8d | |||
| 9029375247 |
5
.changeset/init-mail-package.md
Normal file
5
.changeset/init-mail-package.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@mintel/mail": minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Initial release of the branded email system package.
|
||||||
@@ -1,7 +1,11 @@
|
|||||||
{
|
{
|
||||||
"name": "@mintel/mail",
|
"name": "@mintel/mail",
|
||||||
"version": "1.0.0",
|
"version": "1.2.0",
|
||||||
"private": true,
|
"private": false,
|
||||||
|
"publishConfig": {
|
||||||
|
"access": "public",
|
||||||
|
"registry": "https://npm.infra.mintel.me"
|
||||||
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts",
|
".": "./src/index.ts",
|
||||||
|
|||||||
25
packages/mail/src/index.test.tsx
Normal file
25
packages/mail/src/index.test.tsx
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
import { describe, it, expect } from "vitest";
|
||||||
|
import * as React from "react";
|
||||||
|
import { render } from "./index";
|
||||||
|
import { MintelLogo } from "./components/MintelLogo";
|
||||||
|
import { ContactFormNotification } from "./templates/ContactFormNotification";
|
||||||
|
|
||||||
|
describe("@mintel/mail rendering", () => {
|
||||||
|
it("should render the MintelLogo to HTML", async () => {
|
||||||
|
const html = await render(React.createElement(MintelLogo));
|
||||||
|
expect(html).toContain("Mintel Logo");
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should render a ContactFormNotification to HTML", async () => {
|
||||||
|
const html = await render(
|
||||||
|
React.createElement(ContactFormNotification, {
|
||||||
|
name: "Test User",
|
||||||
|
email: "test@example.com",
|
||||||
|
message: "Hello World",
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
expect(html).toContain("New Submission");
|
||||||
|
expect(html).toContain("Test User");
|
||||||
|
expect(html).toContain("test@example.com");
|
||||||
|
});
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user