X_TEST_STUB_UNANSWERED
Means
a stubbed primitive was called before any answer was scripted
Typical cause
stub(target) replaced the body, and the code under test called it before .returns() or .throws() said what to answer
Fix
const stubbed = await stub(publishPost); stubbed.returns(<output>) — or .throws(new YourError(...)) — before the code under test runs