test: |Worker| add junk_mail_policy regression tests for issue #1084 (#1089)

Cover the junk-mail policy behavior fixed in #1085:
- none/neutral results for SPF/DKIM/DMARC are treated as the method
  being absent and do not trigger JUNK_MAIL_CHECK_LIST rejection
- explicit fail results are still rejected
- JUNK_MAIL_FORCE_PASS_LIST only accepts an explicit pass

Run with: node --test-isolation=none --test worker/src/email/junk_mail_policy.test.mjs

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Josh Tsai
2026-07-25 20:21:46 +08:00
committed by GitHub
co-authored by Claude Fable 5
parent 0581632b59
commit 7eaa3b3b8e
3 changed files with 89 additions and 0 deletions
+4
View File
@@ -21,6 +21,10 @@
- fix: |AI Extract| Convert HTML-only mail bodies into compact readable text before sending them to Workers AI, preventing long templates from pushing verification codes past the 4000-character truncation window
- fix: |Frontend| Add mobile Header page padding so the title and menu button no longer sit too close to the screen edge
### Testing
- test: |Worker| Add junk_mail_policy regression tests (issue #1084): `none`/`neutral` results for SPF/DKIM/DMARC are treated as the method being absent, explicit `fail` results are still rejected, and `JUNK_MAIL_FORCE_PASS_LIST` only accepts an explicit `pass`
### Improvements
- docs: |README| Add a complete Japanese README and Japanese navigation links to the Chinese and English READMEs