mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-08 22:02:54 +00:00
Fix CI, environment, linting, and unit test issues
- Fix circular dependency in `js/adminListStore.js` by importing from `js/nostrClientRegistry.js`. - Update `js/services/hashtagPreferencesService.js` to include legacy kind 30005 in filters. - Fix JSDOM mocking in `tests/modal-accessibility.test.mjs` (navigator getter) and `UploadModal` selectors. - Add `getRoot()` to `js/ui/components/UploadModal.js` for API consistency. - Update `tests/magnet-utils.test.mjs` expectations to reflect removed default tracker. - Mock `ensureActiveSignerForPubkey` in `tests/moderation/submit-report.test.mjs`. - Fix mock loader path in `tests/moderation/trust-seeds.test.mjs` to target `trustBootstrap.js`. - Fix duplicate pointer tags in `js/nostrEventSchemas.js`'s `buildCommentEvent`. - Update `tests/nostr/comment-events.test.mjs` and `tests/comment-event-builder.test.mjs` to match current code behavior (legacy kinds, unique tags).
This commit is contained in:
1 parent
778b35874d
commit
d6882fb5bb
12 files changed
+331
-235
No files matched your search
@@ -49,7 +49,6 @@ test("buildCommentEvent emits NIP-22 root metadata while keeping legacy fallback
|
||||
["K", "30078"],
|
||||
["P", "deadbeefcafebabe"],
|
||||
["E", "video-event-id"],
|
||||
["A", "30078:deadbeefcafebabe:clip-1"],
|
||||
["K", "30078"],
|
||||
]);
|
||||
assert.equal(event.content, "Great video!");
|
||||
@@ -72,7 +71,6 @@ test("buildCommentEvent includes parent pointers, kinds, and authors for replies
|
||||
["K", "30078"],
|
||||
["P", "deadbeefcafebabe"],
|
||||
["E", "video-event-id"],
|
||||
["A", "30078:deadbeefcafebabe:clip-1"],
|
||||
["E", "parent-comment-id", "parent-author"],
|
||||
["K", String(VIDEO_COMMENT_KIND)],
|
||||
["P", "parent-author"],
|
||||
@@ -101,7 +99,6 @@ test("buildCommentEvent normalizes relays and preserves explicit overrides", ()
|
||||
["K", "30078"],
|
||||
["P", "deadbeefcafebabe", "wss://video.def"],
|
||||
["E", "event123", "wss://comments.main"],
|
||||
["A", "30078:deadbeefcafebabe:clip-2", "wss://video.def"],
|
||||
["E", "root-comment", "wss://parent", "cafecafe"],
|
||||
["K", String(VIDEO_COMMENT_KIND)],
|
||||
["P", "cafecafe", "wss://profile"],
|
||||
@@ -151,7 +148,6 @@ test("buildCommentEvent accepts partial metadata for parent overrides", () => {
|
||||
assert.deepStrictEqual(event.tags, [
|
||||
["E", "file-event"],
|
||||
["K", "1063"],
|
||||
["E", "file-event"],
|
||||
["E", "parent-comment", "wss://parent", "parent-only"],
|
||||
["K", "1111"],
|
||||
["P", "parent-only", "wss://parent-author"],
|
||||
|
||||
Reference in new issue
Block a user