feat(testing): add vitest suite + guerrilla mail email pool #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "robacheque/resetea.net:feat/testing-vitest"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Adds a Vitest unit test suite for
POST /api/eraseand two small fixesto the mailer that surfaced during testing.
Tests (
api/tests/erase.test.js)18 tests across 5 suites:
PROVIDER_DATAfrommailer.jstocatch drift if a provider email, name, or URL changes
malformed email, and unknown provider; verifies mailer is never called
use_form+ validformUrlinstead of sending an emailderived dynamically from
PROVIDER_DATA; asserts 200,status: ok,12-char reference, and that
sendErasureMailwas called once with thecorrect payload
without erroring
Transport is fully stubbed via require cache — no real emails sent, no
MTA needed.
Mailer fixes
Reply-Toset to the requester's email so provider replies landin their inbox rather than bouncing at
privacy@resetea.netsendmailis not available locally(dev machines without a local MTA)
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.