stack/apps/backend
BilalG1 69fb5151f0
fix tests (#922)
<!--

Make sure you've read the CONTRIBUTING.md guidelines:
https://github.com/stack-auth/stack-auth/blob/dev/CONTRIBUTING.md

-->

<!-- RECURSEML_SUMMARY:START -->
## High-level PR Summary
This PR fixes test issues by making two primary changes: 1) In the API
keys test, replacing `Date {}` with actual date strings in test
snapshots to make them deterministic, and 2) Adding "react-dom" to the
node modules list in the email rendering component. These changes likely
address test failures that were occurring due to non-deterministic date
serialization in snapshots and a missing dependency.

⏱️ Estimated Review Time: 5-15 minutes

<details>
<summary>💡 Review Order Suggestion</summary>

| Order | File Path |
|-------|-----------|
| 1 | `apps/e2e/tests/js/api-keys.test.ts` |
| 2 | `apps/backend/src/lib/email-rendering.tsx` |
</details>



[![Need help? Join our
Discord](https://img.shields.io/badge/Need%20help%3F%20Join%20our%20Discord-5865F2?style=plastic&logo=discord&logoColor=white)](https://discord.gg/n3SsVDAW6U)

<!-- RECURSEML_SUMMARY:END -->
<!-- ELLIPSIS_HIDDEN -->

----

> [!IMPORTANT]
> Fixes inline snapshot for `expiresAt` in `api-keys.test.ts` and adds
`react-dom` to dependencies in `email-rendering.tsx`.
> 
>   - **Tests**:
> - Fixes inline snapshot for `expiresAt` in `api-keys.test.ts` by using
a constant `expiresAt` variable.
> - Updates `expiresAt` field in three inline snapshots to use
`expiresAt.toISOString()`.
>   - **Dependencies**:
> - Adds `react-dom` version "19.1.1" to `nodeModules` in
`email-rendering.tsx`.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=stack-auth%2Fstack-auth&utm_source=github&utm_medium=referral)<sup>
for 290a6a2cf9. You can
[customize](https://app.ellipsis.dev/stack-auth/settings/summaries) this
summary. It will automatically update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Improved reliability of email template rendering, ensuring content
that relies on DOM behavior renders correctly during Freestyle
executions.

* **Tests**
* Unified expiration timestamps in API key tests for consistency and
updated related snapshots.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-10-03 11:10:35 -07:00
..
prisma Transactions page (#900) 2025-09-20 07:01:07 +00:00
scripts Migration summary 2025-08-25 10:13:18 -07:00
src fix tests (#922) 2025-10-03 11:10:35 -07:00
.env encrypt neon connection strings, update connections route (#879) 2025-09-09 21:35:07 +00:00
.env.development Workflow queue 2025-09-03 13:31:40 -07:00
.eslintrc.cjs tsup for stack-shared (#647) 2025-04-28 21:26:52 -07:00
.gitignore Migrations toolkit (#409) 2025-02-01 17:46:21 -08:00
CHANGELOG.md chore: update package versions 2025-09-26 23:16:39 -05:00
LICENSE Split backend and dashboard (#83) 2024-06-18 15:49:31 +02:00
next.config.mjs Fix STACK-SERVER-QP 2025-02-17 11:12:34 -08:00
package.json chore: update package versions 2025-09-26 23:16:39 -05:00
sentry.client.config.ts JS lib docs (#444) 2025-02-20 00:48:05 +01:00
tsconfig.json In-source unit tests (#429) 2025-02-14 11:47:52 -08:00
vitest.config.ts Auto migration (#526) 2025-07-24 02:38:37 +02:00