fix: estabiliza templates de e-mail no CI

- Usa @react-email/components nos templates para evitar módulos ausentes no Bun 1.3.1\n- Ajusta preload do bun test para expor global Element (evita crash do PrismJS)
This commit is contained in:
esdrasrenan 2025-12-13 21:06:06 -03:00
parent 88a9ef454e
commit 548c2e44d4
5 changed files with 12 additions and 20 deletions

View file

@ -33,6 +33,14 @@ if (typeof window === "undefined" || typeof document === "undefined") {
}
}
const globalTarget = globalThis as Record<string, unknown>
if (typeof globalTarget.Element === "undefined") {
const win = globalTarget.window as undefined | { Element?: unknown }
if (win?.Element) {
globalTarget.Element = win.Element
}
}
const applyFixedDate = () => {
if (fixedTimestamp === null) {
globalThis.Date = OriginalDate