TryGhost
OSS
Ghost
Fixed webmention mock guard going stale on direct nock.cleanAll() calls The module-level webmentionDomainsMocked flag was only reset in restore(), but five DB-lane files (webhook-request, themes, webmentions, milestones, mentions) call nock.cleanAll() directly, bypassing restore(). In that path the interceptors were wiped but the flag stayed true, so the per-test re-registration in vitest-setup-db.ts's afterEach silently no-op'd — exactly the case that afterEach exists to cover — and the webmention mocks stayed gone for the rest of that worker until some other file happened to call restore(). Replaced the flag with a check against nock.activeMocks() so the guard reflects nock's actual live state instead of a boolean that can drift out of sync with it.
nx run ghost:test:integration
Sign in / Sign up
Open main menu
Succeeded
CI Pipeline Execution
nx run ghost:test:integration
Click to copy
Linux
4 CPU cores
read-write
access token used
b84637d4
28909