Files
bitvid/js/nostr
google-labs-jules[bot] cf92269468 fix(tests): resolve unit test failures in comment-events.test.mjs
- Update `publishComment` to return standardized string error codes (e.g., `session-actor-publish-blocked`, `auth-required`) instead of raw Error objects, ensuring consistency with test expectations.
- Introduce `resolveActiveSigner` dependency injection in `publishComment` to allow tests to supply mock signers, resolving failures where `getActiveSigner()` returned null.
- Expose `commentCache` via `__testExports` in `js/nostr/commentEvents.js` and clear it in `tests/nostr/comment-events.test.mjs` via `afterEach` to prevent test state pollution.
- Update test assertions to match the standardized error codes.

This resolves CI failures related to mismatched error messages and shared state in comment event tests.
2026-01-23 17:05:02 +00:00
..