mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-04 20:02:26 +00:00
fix(test): resolve moderation-overrides flakiness and clean artifacts
- Clean up `verify_fix.mjs`, `verify_source_toggle.py`, and logs to fix potential lint/grep issues in CI. - Define `normalizeHexPubkey` on test harness in `tests/helpers/moderation-test-helpers.mjs` to ensure robust `Application` mocking for `ModerationActionController` tests. - Verify build and tests pass. Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
2dc23a5bb4
commit
afaf5b2221
12 files changed
+1
-2565
No files matched your search
@@ -1,260 +0,0 @@
|
||||
|
||||
> [email protected] test:unit
|
||||
> node scripts/run-unit-tests.mjs
|
||||
|
||||
|
||||
→ Running tests/app-batch-fetch-profiles.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
[batchFetchProfiles] Failed to fetch profiles from relay wss://fail.example: Error: relay timed out
|
||||
at Object.list (file:///app/tests/app-batch-fetch-profiles.test.mjs:80:31)
|
||||
at file:///app/js/utils/profileBatchFetcher.js:115:10
|
||||
at Array.map (<anonymous>)
|
||||
at batchFetchProfilesFromRelays (file:///app/js/utils/profileBatchFetcher.js:112:75)
|
||||
at TestContext.<anonymous> (file:///app/tests/app-batch-fetch-profiles.test.mjs:87:11)
|
||||
at Test.runInAsyncScope (node:async_hooks:214:14)
|
||||
at Test.run (node:internal/test_runner/test:1047:25)
|
||||
at Test.start (node:internal/test_runner/test:944:17)
|
||||
at startSubtestAfterBootstrap (node:internal/test_runner/harness:296:17)
|
||||
TAP version 13
|
||||
# Subtest: batchFetchProfiles handles fast and failing relays
|
||||
ok 1 - batchFetchProfiles handles fast and failing relays
|
||||
---
|
||||
duration_ms: 3.910398
|
||||
type: 'test'
|
||||
...
|
||||
1..1
|
||||
# tests 1
|
||||
# suites 0
|
||||
# pass 1
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 26.765285
|
||||
|
||||
→ Running tests/app/channel-profile-moderation.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
[feedEngine/moderation] metadata.moderation updated {
|
||||
stage: 'moderation',
|
||||
videoId: 'vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv',
|
||||
blockAutoplay: true,
|
||||
blurThumbnail: true,
|
||||
trustedCount: 2,
|
||||
reportType: 'nudity',
|
||||
hidden: false,
|
||||
hideReason: null,
|
||||
hideBypass: null
|
||||
}
|
||||
TAP version 13
|
||||
# Subtest: renderChannelVideosFromList decorates videos before storing
|
||||
ok 1 - renderChannelVideosFromList decorates videos before storing
|
||||
---
|
||||
duration_ms: 255.735327
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: renderChannelVideosFromList applies moderation blur without existing metadata
|
||||
ok 2 - renderChannelVideosFromList applies moderation blur without existing metadata
|
||||
---
|
||||
duration_ms: 31.654581
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: applyChannelVisualBlur blurs banner and avatar when viewer mutes author
|
||||
ok 3 - applyChannelVisualBlur blurs banner and avatar when viewer mutes author
|
||||
---
|
||||
duration_ms: 10.838215
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: moderation override clears channel blur via event wiring
|
||||
ok 4 - moderation override clears channel blur via event wiring
|
||||
---
|
||||
duration_ms: 34.798513
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: channel header moderation badge reflects blur state and override actions
|
||||
ok 5 - channel header moderation badge reflects blur state and override actions
|
||||
---
|
||||
duration_ms: 32.153884
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: channel video cards update moderation state in place when summary changes
|
||||
ok 6 - channel video cards update moderation state in place when summary changes
|
||||
---
|
||||
duration_ms: 21.578259
|
||||
type: 'test'
|
||||
...
|
||||
1..6
|
||||
# tests 6
|
||||
# suites 0
|
||||
# pass 6
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 398.296397
|
||||
|
||||
→ Running tests/app/hash-change-handler.test.mjs
|
||||
TAP version 13
|
||||
# Subtest: handleHashChange defaults to for-you when logged in
|
||||
ok 1 - handleHashChange defaults to for-you when logged in
|
||||
---
|
||||
duration_ms: 74.173116
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handleHashChange defaults to most-recent-videos when logged out
|
||||
ok 2 - handleHashChange defaults to most-recent-videos when logged out
|
||||
---
|
||||
duration_ms: 9.658917
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handleHashChange respects explicit view regardless of login state
|
||||
ok 3 - handleHashChange respects explicit view regardless of login state
|
||||
---
|
||||
duration_ms: 9.775207
|
||||
type: 'test'
|
||||
...
|
||||
1..3
|
||||
# tests 3
|
||||
# suites 0
|
||||
# pass 3
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 106.244019
|
||||
|
||||
→ Running tests/app/hydrate-sidebar-navigation.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
TAP version 13
|
||||
# Subtest: hydrateSidebarNavigation reveals chrome controls for authenticated viewers
|
||||
ok 1 - hydrateSidebarNavigation reveals chrome controls for authenticated viewers
|
||||
---
|
||||
duration_ms: 104.182525
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: hydrateSidebarNavigation hides chrome controls for logged-out viewers
|
||||
ok 2 - hydrateSidebarNavigation hides chrome controls for logged-out viewers
|
||||
---
|
||||
duration_ms: 28.824807
|
||||
type: 'test'
|
||||
...
|
||||
1..2
|
||||
# tests 2
|
||||
# suites 0
|
||||
# pass 2
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 148.628996
|
||||
|
||||
→ Running tests/app/is-user-logged-in.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
TAP version 13
|
||||
# Subtest: isUserLoggedIn returns false when no user pubkey is set
|
||||
ok 1 - isUserLoggedIn returns false when no user pubkey is set
|
||||
---
|
||||
duration_ms: 1.372662
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isUserLoggedIn treats extension logins as authenticated
|
||||
ok 2 - isUserLoggedIn treats extension logins as authenticated
|
||||
---
|
||||
duration_ms: 0.381678
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isUserLoggedIn guards against mismatched nostrClient state
|
||||
ok 3 - isUserLoggedIn guards against mismatched nostrClient state
|
||||
---
|
||||
duration_ms: 0.211323
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isUserLoggedIn ignores anonymous session actor mismatches
|
||||
ok 4 - isUserLoggedIn ignores anonymous session actor mismatches
|
||||
---
|
||||
duration_ms: 0.255464
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isUserLoggedIn rejects mismatched managed session actors
|
||||
ok 5 - isUserLoggedIn rejects mismatched managed session actors
|
||||
---
|
||||
duration_ms: 0.321204
|
||||
type: 'test'
|
||||
...
|
||||
1..5
|
||||
# tests 5
|
||||
# suites 0
|
||||
# pass 5
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 33.821343
|
||||
|
||||
→ Running tests/app/moderation-overrides.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
TAP version 13
|
||||
# Subtest: handleModerationOverride decorates stored and current videos then refreshes UI
|
||||
ok 1 - handleModerationOverride decorates stored and current videos then refreshes UI
|
||||
---
|
||||
duration_ms: 242.055409
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handleModerationOverride resumes deferred playback
|
||||
ok 2 - handleModerationOverride resumes deferred playback
|
||||
---
|
||||
duration_ms: 1.66123
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handleModerationBlock requests a block, clears overrides, and refreshes hidden state
|
||||
not ok 3 - handleModerationBlock requests a block, clears overrides, and refreshes hidden state
|
||||
---
|
||||
duration_ms: 5.442489
|
||||
type: 'test'
|
||||
location: '/app/tests/app/moderation-overrides.test.mjs:112:1'
|
||||
failureType: 'testCodeFailure'
|
||||
error: |-
|
||||
Expected values to be strictly equal:
|
||||
|
||||
false !== true
|
||||
|
||||
code: 'ERR_ASSERTION'
|
||||
name: 'AssertionError'
|
||||
expected: true
|
||||
actual: false
|
||||
operator: 'strictEqual'
|
||||
stack: |-
|
||||
TestContext.<anonymous> (file:///app/tests/app/moderation-overrides.test.mjs:228:10)
|
||||
async Test.run (node:internal/test_runner/test:1054:7)
|
||||
async Test.processPendingSubtests (node:internal/test_runner/test:744:7)
|
||||
...
|
||||
# Subtest: handleModerationBlock returns false when viewer is logged out
|
||||
ok 4 - handleModerationBlock returns false when viewer is logged out
|
||||
---
|
||||
duration_ms: 1.600465
|
||||
type: 'test'
|
||||
...
|
||||
1..4
|
||||
# tests 4
|
||||
# suites 0
|
||||
# pass 3
|
||||
# fail 1
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 286.782704
|
||||
file:///app/scripts/run-unit-tests.mjs:68
|
||||
reject(new Error(`${relativePath} failed with exit code ${code}`));
|
||||
^
|
||||
|
||||
Error: tests/app/moderation-overrides.test.mjs failed with exit code 1
|
||||
at ChildProcess.<anonymous> (file:///app/scripts/run-unit-tests.mjs:68:16)
|
||||
at ChildProcess.emit (node:events:519:28)
|
||||
at maybeClose (node:internal/child_process:1101:16)
|
||||
at ChildProcess._handle.onexit (node:internal/child_process:304:5)
|
||||
|
||||
Node.js v22.21.1
|
||||
@@ -1,260 +0,0 @@
|
||||
|
||||
> [email protected] test:unit
|
||||
> node scripts/run-unit-tests.mjs
|
||||
|
||||
|
||||
→ Running tests/app-batch-fetch-profiles.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
[batchFetchProfiles] Failed to fetch profiles from relay wss://fail.example: Error: relay timed out
|
||||
at Object.list (file:///app/tests/app-batch-fetch-profiles.test.mjs:80:31)
|
||||
at file:///app/js/utils/profileBatchFetcher.js:115:10
|
||||
at Array.map (<anonymous>)
|
||||
at batchFetchProfilesFromRelays (file:///app/js/utils/profileBatchFetcher.js:112:75)
|
||||
at TestContext.<anonymous> (file:///app/tests/app-batch-fetch-profiles.test.mjs:87:11)
|
||||
at Test.runInAsyncScope (node:async_hooks:214:14)
|
||||
at Test.run (node:internal/test_runner/test:1047:25)
|
||||
at Test.start (node:internal/test_runner/test:944:17)
|
||||
at startSubtestAfterBootstrap (node:internal/test_runner/harness:296:17)
|
||||
TAP version 13
|
||||
# Subtest: batchFetchProfiles handles fast and failing relays
|
||||
ok 1 - batchFetchProfiles handles fast and failing relays
|
||||
---
|
||||
duration_ms: 22.244233
|
||||
type: 'test'
|
||||
...
|
||||
1..1
|
||||
# tests 1
|
||||
# suites 0
|
||||
# pass 1
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 36.538516
|
||||
|
||||
→ Running tests/app/channel-profile-moderation.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
[feedEngine/moderation] metadata.moderation updated {
|
||||
stage: 'moderation',
|
||||
videoId: 'vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv',
|
||||
blockAutoplay: true,
|
||||
blurThumbnail: true,
|
||||
trustedCount: 2,
|
||||
reportType: 'nudity',
|
||||
hidden: false,
|
||||
hideReason: null,
|
||||
hideBypass: null
|
||||
}
|
||||
TAP version 13
|
||||
# Subtest: renderChannelVideosFromList decorates videos before storing
|
||||
ok 1 - renderChannelVideosFromList decorates videos before storing
|
||||
---
|
||||
duration_ms: 316.648044
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: renderChannelVideosFromList applies moderation blur without existing metadata
|
||||
ok 2 - renderChannelVideosFromList applies moderation blur without existing metadata
|
||||
---
|
||||
duration_ms: 46.776425
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: applyChannelVisualBlur blurs banner and avatar when viewer mutes author
|
||||
ok 3 - applyChannelVisualBlur blurs banner and avatar when viewer mutes author
|
||||
---
|
||||
duration_ms: 15.209442
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: moderation override clears channel blur via event wiring
|
||||
ok 4 - moderation override clears channel blur via event wiring
|
||||
---
|
||||
duration_ms: 36.087729
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: channel header moderation badge reflects blur state and override actions
|
||||
ok 5 - channel header moderation badge reflects blur state and override actions
|
||||
---
|
||||
duration_ms: 39.830563
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: channel video cards update moderation state in place when summary changes
|
||||
ok 6 - channel video cards update moderation state in place when summary changes
|
||||
---
|
||||
duration_ms: 32.84156
|
||||
type: 'test'
|
||||
...
|
||||
1..6
|
||||
# tests 6
|
||||
# suites 0
|
||||
# pass 6
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 501.07657
|
||||
|
||||
→ Running tests/app/hash-change-handler.test.mjs
|
||||
TAP version 13
|
||||
# Subtest: handleHashChange defaults to for-you when logged in
|
||||
ok 1 - handleHashChange defaults to for-you when logged in
|
||||
---
|
||||
duration_ms: 73.46412
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handleHashChange defaults to most-recent-videos when logged out
|
||||
ok 2 - handleHashChange defaults to most-recent-videos when logged out
|
||||
---
|
||||
duration_ms: 9.611748
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handleHashChange respects explicit view regardless of login state
|
||||
ok 3 - handleHashChange respects explicit view regardless of login state
|
||||
---
|
||||
duration_ms: 9.764783
|
||||
type: 'test'
|
||||
...
|
||||
1..3
|
||||
# tests 3
|
||||
# suites 0
|
||||
# pass 3
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 110.646914
|
||||
|
||||
→ Running tests/app/hydrate-sidebar-navigation.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
TAP version 13
|
||||
# Subtest: hydrateSidebarNavigation reveals chrome controls for authenticated viewers
|
||||
ok 1 - hydrateSidebarNavigation reveals chrome controls for authenticated viewers
|
||||
---
|
||||
duration_ms: 99.746325
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: hydrateSidebarNavigation hides chrome controls for logged-out viewers
|
||||
ok 2 - hydrateSidebarNavigation hides chrome controls for logged-out viewers
|
||||
---
|
||||
duration_ms: 26.407756
|
||||
type: 'test'
|
||||
...
|
||||
1..2
|
||||
# tests 2
|
||||
# suites 0
|
||||
# pass 2
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 141.088808
|
||||
|
||||
→ Running tests/app/is-user-logged-in.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
TAP version 13
|
||||
# Subtest: isUserLoggedIn returns false when no user pubkey is set
|
||||
ok 1 - isUserLoggedIn returns false when no user pubkey is set
|
||||
---
|
||||
duration_ms: 1.373918
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isUserLoggedIn treats extension logins as authenticated
|
||||
ok 2 - isUserLoggedIn treats extension logins as authenticated
|
||||
---
|
||||
duration_ms: 0.408152
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isUserLoggedIn guards against mismatched nostrClient state
|
||||
ok 3 - isUserLoggedIn guards against mismatched nostrClient state
|
||||
---
|
||||
duration_ms: 0.244921
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isUserLoggedIn ignores anonymous session actor mismatches
|
||||
ok 4 - isUserLoggedIn ignores anonymous session actor mismatches
|
||||
---
|
||||
duration_ms: 0.257353
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isUserLoggedIn rejects mismatched managed session actors
|
||||
ok 5 - isUserLoggedIn rejects mismatched managed session actors
|
||||
---
|
||||
duration_ms: 0.311313
|
||||
type: 'test'
|
||||
...
|
||||
1..5
|
||||
# tests 5
|
||||
# suites 0
|
||||
# pass 5
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 32.052639
|
||||
|
||||
→ Running tests/app/moderation-overrides.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
TAP version 13
|
||||
# Subtest: handleModerationOverride decorates stored and current videos then refreshes UI
|
||||
ok 1 - handleModerationOverride decorates stored and current videos then refreshes UI
|
||||
---
|
||||
duration_ms: 212.505662
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handleModerationOverride resumes deferred playback
|
||||
ok 2 - handleModerationOverride resumes deferred playback
|
||||
---
|
||||
duration_ms: 1.28636
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handleModerationBlock requests a block, clears overrides, and refreshes hidden state
|
||||
not ok 3 - handleModerationBlock requests a block, clears overrides, and refreshes hidden state
|
||||
---
|
||||
duration_ms: 4.64235
|
||||
type: 'test'
|
||||
location: '/app/tests/app/moderation-overrides.test.mjs:112:1'
|
||||
failureType: 'testCodeFailure'
|
||||
error: |-
|
||||
Expected values to be strictly equal:
|
||||
|
||||
false !== true
|
||||
|
||||
code: 'ERR_ASSERTION'
|
||||
name: 'AssertionError'
|
||||
expected: true
|
||||
actual: false
|
||||
operator: 'strictEqual'
|
||||
stack: |-
|
||||
TestContext.<anonymous> (file:///app/tests/app/moderation-overrides.test.mjs:228:10)
|
||||
async Test.run (node:internal/test_runner/test:1054:7)
|
||||
async Test.processPendingSubtests (node:internal/test_runner/test:744:7)
|
||||
...
|
||||
# Subtest: handleModerationBlock returns false when viewer is logged out
|
||||
ok 4 - handleModerationBlock returns false when viewer is logged out
|
||||
---
|
||||
duration_ms: 1.619904
|
||||
type: 'test'
|
||||
...
|
||||
1..4
|
||||
# tests 4
|
||||
# suites 0
|
||||
# pass 3
|
||||
# fail 1
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 250.717362
|
||||
file:///app/scripts/run-unit-tests.mjs:68
|
||||
reject(new Error(`${relativePath} failed with exit code ${code}`));
|
||||
^
|
||||
|
||||
Error: tests/app/moderation-overrides.test.mjs failed with exit code 1
|
||||
at ChildProcess.<anonymous> (file:///app/scripts/run-unit-tests.mjs:68:16)
|
||||
at ChildProcess.emit (node:events:519:28)
|
||||
at maybeClose (node:internal/child_process:1101:16)
|
||||
at ChildProcess._handle.onexit (node:internal/child_process:304:5)
|
||||
|
||||
Node.js v22.21.1
|
||||
@@ -1,261 +0,0 @@
|
||||
|
||||
> [email protected] test:unit
|
||||
> node scripts/run-unit-tests.mjs
|
||||
|
||||
|
||||
→ Running tests/app-batch-fetch-profiles.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
[batchFetchProfiles] Failed to fetch profiles from relay wss://fail.example: Error: relay timed out
|
||||
at Object.list (file:///app/tests/app-batch-fetch-profiles.test.mjs:80:31)
|
||||
at file:///app/js/utils/profileBatchFetcher.js:115:10
|
||||
at Array.map (<anonymous>)
|
||||
at batchFetchProfilesFromRelays (file:///app/js/utils/profileBatchFetcher.js:112:75)
|
||||
at TestContext.<anonymous> (file:///app/tests/app-batch-fetch-profiles.test.mjs:87:11)
|
||||
at Test.runInAsyncScope (node:async_hooks:214:14)
|
||||
at Test.run (node:internal/test_runner/test:1047:25)
|
||||
at Test.start (node:internal/test_runner/test:944:17)
|
||||
at startSubtestAfterBootstrap (node:internal/test_runner/harness:296:17)
|
||||
TAP version 13
|
||||
# Subtest: batchFetchProfiles handles fast and failing relays
|
||||
ok 1 - batchFetchProfiles handles fast and failing relays
|
||||
---
|
||||
duration_ms: 7.683186
|
||||
type: 'test'
|
||||
...
|
||||
1..1
|
||||
# tests 1
|
||||
# suites 0
|
||||
# pass 1
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 28.640279
|
||||
|
||||
→ Running tests/app/channel-profile-moderation.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
[feedEngine/moderation] metadata.moderation updated {
|
||||
stage: 'moderation',
|
||||
videoId: 'vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv',
|
||||
blockAutoplay: true,
|
||||
blurThumbnail: true,
|
||||
trustedCount: 2,
|
||||
reportType: 'nudity',
|
||||
hidden: false,
|
||||
hideReason: null,
|
||||
hideBypass: null
|
||||
}
|
||||
TAP version 13
|
||||
# Subtest: renderChannelVideosFromList decorates videos before storing
|
||||
ok 1 - renderChannelVideosFromList decorates videos before storing
|
||||
---
|
||||
duration_ms: 376.493065
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: renderChannelVideosFromList applies moderation blur without existing metadata
|
||||
ok 2 - renderChannelVideosFromList applies moderation blur without existing metadata
|
||||
---
|
||||
duration_ms: 39.743453
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: applyChannelVisualBlur blurs banner and avatar when viewer mutes author
|
||||
ok 3 - applyChannelVisualBlur blurs banner and avatar when viewer mutes author
|
||||
---
|
||||
duration_ms: 15.335853
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: moderation override clears channel blur via event wiring
|
||||
ok 4 - moderation override clears channel blur via event wiring
|
||||
---
|
||||
duration_ms: 47.515622
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: channel header moderation badge reflects blur state and override actions
|
||||
ok 5 - channel header moderation badge reflects blur state and override actions
|
||||
---
|
||||
duration_ms: 52.962084
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: channel video cards update moderation state in place when summary changes
|
||||
ok 6 - channel video cards update moderation state in place when summary changes
|
||||
---
|
||||
duration_ms: 27.377719
|
||||
type: 'test'
|
||||
...
|
||||
1..6
|
||||
# tests 6
|
||||
# suites 0
|
||||
# pass 6
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 573.718626
|
||||
|
||||
→ Running tests/app/hash-change-handler.test.mjs
|
||||
TAP version 13
|
||||
# Subtest: handleHashChange defaults to for-you when logged in
|
||||
ok 1 - handleHashChange defaults to for-you when logged in
|
||||
---
|
||||
duration_ms: 73.304539
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handleHashChange defaults to most-recent-videos when logged out
|
||||
ok 2 - handleHashChange defaults to most-recent-videos when logged out
|
||||
---
|
||||
duration_ms: 9.802311
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handleHashChange respects explicit view regardless of login state
|
||||
ok 3 - handleHashChange respects explicit view regardless of login state
|
||||
---
|
||||
duration_ms: 10.826679
|
||||
type: 'test'
|
||||
...
|
||||
1..3
|
||||
# tests 3
|
||||
# suites 0
|
||||
# pass 3
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 111.820727
|
||||
|
||||
→ Running tests/app/hydrate-sidebar-navigation.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
TAP version 13
|
||||
# Subtest: hydrateSidebarNavigation reveals chrome controls for authenticated viewers
|
||||
ok 1 - hydrateSidebarNavigation reveals chrome controls for authenticated viewers
|
||||
---
|
||||
duration_ms: 121.895181
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: hydrateSidebarNavigation hides chrome controls for logged-out viewers
|
||||
ok 2 - hydrateSidebarNavigation hides chrome controls for logged-out viewers
|
||||
---
|
||||
duration_ms: 27.859075
|
||||
type: 'test'
|
||||
...
|
||||
1..2
|
||||
# tests 2
|
||||
# suites 0
|
||||
# pass 2
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 166.232762
|
||||
|
||||
→ Running tests/app/is-user-logged-in.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
TAP version 13
|
||||
# Subtest: isUserLoggedIn returns false when no user pubkey is set
|
||||
ok 1 - isUserLoggedIn returns false when no user pubkey is set
|
||||
---
|
||||
duration_ms: 2.070726
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isUserLoggedIn treats extension logins as authenticated
|
||||
ok 2 - isUserLoggedIn treats extension logins as authenticated
|
||||
---
|
||||
duration_ms: 0.592571
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isUserLoggedIn guards against mismatched nostrClient state
|
||||
ok 3 - isUserLoggedIn guards against mismatched nostrClient state
|
||||
---
|
||||
duration_ms: 0.445862
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isUserLoggedIn ignores anonymous session actor mismatches
|
||||
ok 4 - isUserLoggedIn ignores anonymous session actor mismatches
|
||||
---
|
||||
duration_ms: 0.5379
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isUserLoggedIn rejects mismatched managed session actors
|
||||
ok 5 - isUserLoggedIn rejects mismatched managed session actors
|
||||
---
|
||||
duration_ms: 0.568571
|
||||
type: 'test'
|
||||
...
|
||||
1..5
|
||||
# tests 5
|
||||
# suites 0
|
||||
# pass 5
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 42.558696
|
||||
|
||||
→ Running tests/app/moderation-overrides.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
DEBUG: Test 3 Result: true
|
||||
TAP version 13
|
||||
# Subtest: handleModerationOverride decorates stored and current videos then refreshes UI
|
||||
ok 1 - handleModerationOverride decorates stored and current videos then refreshes UI
|
||||
---
|
||||
duration_ms: 221.521473
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handleModerationOverride resumes deferred playback
|
||||
ok 2 - handleModerationOverride resumes deferred playback
|
||||
---
|
||||
duration_ms: 1.277155
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handleModerationBlock requests a block, clears overrides, and refreshes hidden state
|
||||
not ok 3 - handleModerationBlock requests a block, clears overrides, and refreshes hidden state
|
||||
---
|
||||
duration_ms: 5.235509
|
||||
type: 'test'
|
||||
location: '/app/tests/app/moderation-overrides.test.mjs:112:1'
|
||||
failureType: 'testCodeFailure'
|
||||
error: |-
|
||||
Expected values to be strictly equal:
|
||||
|
||||
false !== true
|
||||
|
||||
code: 'ERR_ASSERTION'
|
||||
name: 'AssertionError'
|
||||
expected: true
|
||||
actual: false
|
||||
operator: 'strictEqual'
|
||||
stack: |-
|
||||
TestContext.<anonymous> (file:///app/tests/app/moderation-overrides.test.mjs:229:10)
|
||||
async Test.run (node:internal/test_runner/test:1054:7)
|
||||
async Test.processPendingSubtests (node:internal/test_runner/test:744:7)
|
||||
...
|
||||
# Subtest: handleModerationBlock returns false when viewer is logged out
|
||||
ok 4 - handleModerationBlock returns false when viewer is logged out
|
||||
---
|
||||
duration_ms: 1.748986
|
||||
type: 'test'
|
||||
...
|
||||
1..4
|
||||
# tests 4
|
||||
# suites 0
|
||||
# pass 3
|
||||
# fail 1
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 263.815159
|
||||
file:///app/scripts/run-unit-tests.mjs:68
|
||||
reject(new Error(`${relativePath} failed with exit code ${code}`));
|
||||
^
|
||||
|
||||
Error: tests/app/moderation-overrides.test.mjs failed with exit code 1
|
||||
at ChildProcess.<anonymous> (file:///app/scripts/run-unit-tests.mjs:68:16)
|
||||
at ChildProcess.emit (node:events:519:28)
|
||||
at maybeClose (node:internal/child_process:1101:16)
|
||||
at ChildProcess._handle.onexit (node:internal/child_process:304:5)
|
||||
|
||||
Node.js v22.21.1
|
||||
@@ -1,260 +0,0 @@
|
||||
|
||||
> [email protected] test:unit
|
||||
> node scripts/run-unit-tests.mjs
|
||||
|
||||
|
||||
→ Running tests/app-batch-fetch-profiles.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
[batchFetchProfiles] Failed to fetch profiles from relay wss://fail.example: Error: relay timed out
|
||||
at Object.list (file:///app/tests/app-batch-fetch-profiles.test.mjs:80:31)
|
||||
at file:///app/js/utils/profileBatchFetcher.js:115:10
|
||||
at Array.map (<anonymous>)
|
||||
at batchFetchProfilesFromRelays (file:///app/js/utils/profileBatchFetcher.js:112:75)
|
||||
at TestContext.<anonymous> (file:///app/tests/app-batch-fetch-profiles.test.mjs:87:11)
|
||||
at Test.runInAsyncScope (node:async_hooks:214:14)
|
||||
at Test.run (node:internal/test_runner/test:1047:25)
|
||||
at Test.start (node:internal/test_runner/test:944:17)
|
||||
at startSubtestAfterBootstrap (node:internal/test_runner/harness:296:17)
|
||||
TAP version 13
|
||||
# Subtest: batchFetchProfiles handles fast and failing relays
|
||||
ok 1 - batchFetchProfiles handles fast and failing relays
|
||||
---
|
||||
duration_ms: 3.941211
|
||||
type: 'test'
|
||||
...
|
||||
1..1
|
||||
# tests 1
|
||||
# suites 0
|
||||
# pass 1
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 16.455907
|
||||
|
||||
→ Running tests/app/channel-profile-moderation.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
[feedEngine/moderation] metadata.moderation updated {
|
||||
stage: 'moderation',
|
||||
videoId: 'vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv',
|
||||
blockAutoplay: true,
|
||||
blurThumbnail: true,
|
||||
trustedCount: 2,
|
||||
reportType: 'nudity',
|
||||
hidden: false,
|
||||
hideReason: null,
|
||||
hideBypass: null
|
||||
}
|
||||
TAP version 13
|
||||
# Subtest: renderChannelVideosFromList decorates videos before storing
|
||||
ok 1 - renderChannelVideosFromList decorates videos before storing
|
||||
---
|
||||
duration_ms: 243.403366
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: renderChannelVideosFromList applies moderation blur without existing metadata
|
||||
ok 2 - renderChannelVideosFromList applies moderation blur without existing metadata
|
||||
---
|
||||
duration_ms: 31.534109
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: applyChannelVisualBlur blurs banner and avatar when viewer mutes author
|
||||
ok 3 - applyChannelVisualBlur blurs banner and avatar when viewer mutes author
|
||||
---
|
||||
duration_ms: 10.992319
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: moderation override clears channel blur via event wiring
|
||||
ok 4 - moderation override clears channel blur via event wiring
|
||||
---
|
||||
duration_ms: 38.203729
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: channel header moderation badge reflects blur state and override actions
|
||||
ok 5 - channel header moderation badge reflects blur state and override actions
|
||||
---
|
||||
duration_ms: 32.713928
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: channel video cards update moderation state in place when summary changes
|
||||
ok 6 - channel video cards update moderation state in place when summary changes
|
||||
---
|
||||
duration_ms: 20.992921
|
||||
type: 'test'
|
||||
...
|
||||
1..6
|
||||
# tests 6
|
||||
# suites 0
|
||||
# pass 6
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 389.736415
|
||||
|
||||
→ Running tests/app/hash-change-handler.test.mjs
|
||||
TAP version 13
|
||||
# Subtest: handleHashChange defaults to for-you when logged in
|
||||
ok 1 - handleHashChange defaults to for-you when logged in
|
||||
---
|
||||
duration_ms: 73.866587
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handleHashChange defaults to most-recent-videos when logged out
|
||||
ok 2 - handleHashChange defaults to most-recent-videos when logged out
|
||||
---
|
||||
duration_ms: 9.66665
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handleHashChange respects explicit view regardless of login state
|
||||
ok 3 - handleHashChange respects explicit view regardless of login state
|
||||
---
|
||||
duration_ms: 9.863301
|
||||
type: 'test'
|
||||
...
|
||||
1..3
|
||||
# tests 3
|
||||
# suites 0
|
||||
# pass 3
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 106.76867
|
||||
|
||||
→ Running tests/app/hydrate-sidebar-navigation.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
TAP version 13
|
||||
# Subtest: hydrateSidebarNavigation reveals chrome controls for authenticated viewers
|
||||
ok 1 - hydrateSidebarNavigation reveals chrome controls for authenticated viewers
|
||||
---
|
||||
duration_ms: 85.299474
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: hydrateSidebarNavigation hides chrome controls for logged-out viewers
|
||||
ok 2 - hydrateSidebarNavigation hides chrome controls for logged-out viewers
|
||||
---
|
||||
duration_ms: 13.586181
|
||||
type: 'test'
|
||||
...
|
||||
1..2
|
||||
# tests 2
|
||||
# suites 0
|
||||
# pass 2
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 110.142612
|
||||
|
||||
→ Running tests/app/is-user-logged-in.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
TAP version 13
|
||||
# Subtest: isUserLoggedIn returns false when no user pubkey is set
|
||||
ok 1 - isUserLoggedIn returns false when no user pubkey is set
|
||||
---
|
||||
duration_ms: 1.567229
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isUserLoggedIn treats extension logins as authenticated
|
||||
ok 2 - isUserLoggedIn treats extension logins as authenticated
|
||||
---
|
||||
duration_ms: 0.354268
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isUserLoggedIn guards against mismatched nostrClient state
|
||||
ok 3 - isUserLoggedIn guards against mismatched nostrClient state
|
||||
---
|
||||
duration_ms: 0.275984
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isUserLoggedIn ignores anonymous session actor mismatches
|
||||
ok 4 - isUserLoggedIn ignores anonymous session actor mismatches
|
||||
---
|
||||
duration_ms: 0.274841
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isUserLoggedIn rejects mismatched managed session actors
|
||||
ok 5 - isUserLoggedIn rejects mismatched managed session actors
|
||||
---
|
||||
duration_ms: 0.252751
|
||||
type: 'test'
|
||||
...
|
||||
1..5
|
||||
# tests 5
|
||||
# suites 0
|
||||
# pass 5
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 34.328915
|
||||
|
||||
→ Running tests/app/moderation-overrides.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
TAP version 13
|
||||
# Subtest: handleModerationOverride decorates stored and current videos then refreshes UI
|
||||
ok 1 - handleModerationOverride decorates stored and current videos then refreshes UI
|
||||
---
|
||||
duration_ms: 225.848661
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handleModerationOverride resumes deferred playback
|
||||
ok 2 - handleModerationOverride resumes deferred playback
|
||||
---
|
||||
duration_ms: 1.28016
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handleModerationBlock requests a block, clears overrides, and refreshes hidden state
|
||||
not ok 3 - handleModerationBlock requests a block, clears overrides, and refreshes hidden state
|
||||
---
|
||||
duration_ms: 5.041835
|
||||
type: 'test'
|
||||
location: '/app/tests/app/moderation-overrides.test.mjs:112:1'
|
||||
failureType: 'testCodeFailure'
|
||||
error: |-
|
||||
Expected values to be strictly equal:
|
||||
|
||||
false !== true
|
||||
|
||||
code: 'ERR_ASSERTION'
|
||||
name: 'AssertionError'
|
||||
expected: true
|
||||
actual: false
|
||||
operator: 'strictEqual'
|
||||
stack: |-
|
||||
TestContext.<anonymous> (file:///app/tests/app/moderation-overrides.test.mjs:232:10)
|
||||
async Test.run (node:internal/test_runner/test:1054:7)
|
||||
async Test.processPendingSubtests (node:internal/test_runner/test:744:7)
|
||||
...
|
||||
# Subtest: handleModerationBlock returns false when viewer is logged out
|
||||
ok 4 - handleModerationBlock returns false when viewer is logged out
|
||||
---
|
||||
duration_ms: 1.571133
|
||||
type: 'test'
|
||||
...
|
||||
1..4
|
||||
# tests 4
|
||||
# suites 0
|
||||
# pass 3
|
||||
# fail 1
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 268.845775
|
||||
file:///app/scripts/run-unit-tests.mjs:68
|
||||
reject(new Error(`${relativePath} failed with exit code ${code}`));
|
||||
^
|
||||
|
||||
Error: tests/app/moderation-overrides.test.mjs failed with exit code 1
|
||||
at ChildProcess.<anonymous> (file:///app/scripts/run-unit-tests.mjs:68:16)
|
||||
at ChildProcess.emit (node:events:519:28)
|
||||
at maybeClose (node:internal/child_process:1101:16)
|
||||
at ChildProcess._handle.onexit (node:internal/child_process:304:5)
|
||||
|
||||
Node.js v22.21.1
|
||||
@@ -1,260 +0,0 @@
|
||||
|
||||
> [email protected] test:unit
|
||||
> node scripts/run-unit-tests.mjs
|
||||
|
||||
|
||||
→ Running tests/app-batch-fetch-profiles.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
[batchFetchProfiles] Failed to fetch profiles from relay wss://fail.example: Error: relay timed out
|
||||
at Object.list (file:///app/tests/app-batch-fetch-profiles.test.mjs:80:31)
|
||||
at file:///app/js/utils/profileBatchFetcher.js:115:10
|
||||
at Array.map (<anonymous>)
|
||||
at batchFetchProfilesFromRelays (file:///app/js/utils/profileBatchFetcher.js:112:75)
|
||||
at TestContext.<anonymous> (file:///app/tests/app-batch-fetch-profiles.test.mjs:87:11)
|
||||
at Test.runInAsyncScope (node:async_hooks:214:14)
|
||||
at Test.run (node:internal/test_runner/test:1047:25)
|
||||
at Test.start (node:internal/test_runner/test:944:17)
|
||||
at startSubtestAfterBootstrap (node:internal/test_runner/harness:296:17)
|
||||
TAP version 13
|
||||
# Subtest: batchFetchProfiles handles fast and failing relays
|
||||
ok 1 - batchFetchProfiles handles fast and failing relays
|
||||
---
|
||||
duration_ms: 7.891372
|
||||
type: 'test'
|
||||
...
|
||||
1..1
|
||||
# tests 1
|
||||
# suites 0
|
||||
# pass 1
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 22.271669
|
||||
|
||||
→ Running tests/app/channel-profile-moderation.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
[feedEngine/moderation] metadata.moderation updated {
|
||||
stage: 'moderation',
|
||||
videoId: 'vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv',
|
||||
blockAutoplay: true,
|
||||
blurThumbnail: true,
|
||||
trustedCount: 2,
|
||||
reportType: 'nudity',
|
||||
hidden: false,
|
||||
hideReason: null,
|
||||
hideBypass: null
|
||||
}
|
||||
TAP version 13
|
||||
# Subtest: renderChannelVideosFromList decorates videos before storing
|
||||
ok 1 - renderChannelVideosFromList decorates videos before storing
|
||||
---
|
||||
duration_ms: 361.619024
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: renderChannelVideosFromList applies moderation blur without existing metadata
|
||||
ok 2 - renderChannelVideosFromList applies moderation blur without existing metadata
|
||||
---
|
||||
duration_ms: 40.463597
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: applyChannelVisualBlur blurs banner and avatar when viewer mutes author
|
||||
ok 3 - applyChannelVisualBlur blurs banner and avatar when viewer mutes author
|
||||
---
|
||||
duration_ms: 16.290213
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: moderation override clears channel blur via event wiring
|
||||
ok 4 - moderation override clears channel blur via event wiring
|
||||
---
|
||||
duration_ms: 42.036247
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: channel header moderation badge reflects blur state and override actions
|
||||
ok 5 - channel header moderation badge reflects blur state and override actions
|
||||
---
|
||||
duration_ms: 42.837872
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: channel video cards update moderation state in place when summary changes
|
||||
ok 6 - channel video cards update moderation state in place when summary changes
|
||||
---
|
||||
duration_ms: 26.383893
|
||||
type: 'test'
|
||||
...
|
||||
1..6
|
||||
# tests 6
|
||||
# suites 0
|
||||
# pass 6
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 542.904828
|
||||
|
||||
→ Running tests/app/hash-change-handler.test.mjs
|
||||
TAP version 13
|
||||
# Subtest: handleHashChange defaults to for-you when logged in
|
||||
ok 1 - handleHashChange defaults to for-you when logged in
|
||||
---
|
||||
duration_ms: 82.739827
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handleHashChange defaults to most-recent-videos when logged out
|
||||
ok 2 - handleHashChange defaults to most-recent-videos when logged out
|
||||
---
|
||||
duration_ms: 21.613469
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handleHashChange respects explicit view regardless of login state
|
||||
ok 3 - handleHashChange respects explicit view regardless of login state
|
||||
---
|
||||
duration_ms: 11.465331
|
||||
type: 'test'
|
||||
...
|
||||
1..3
|
||||
# tests 3
|
||||
# suites 0
|
||||
# pass 3
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 133.942749
|
||||
|
||||
→ Running tests/app/hydrate-sidebar-navigation.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
TAP version 13
|
||||
# Subtest: hydrateSidebarNavigation reveals chrome controls for authenticated viewers
|
||||
ok 1 - hydrateSidebarNavigation reveals chrome controls for authenticated viewers
|
||||
---
|
||||
duration_ms: 101.830503
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: hydrateSidebarNavigation hides chrome controls for logged-out viewers
|
||||
ok 2 - hydrateSidebarNavigation hides chrome controls for logged-out viewers
|
||||
---
|
||||
duration_ms: 26.06532
|
||||
type: 'test'
|
||||
...
|
||||
1..2
|
||||
# tests 2
|
||||
# suites 0
|
||||
# pass 2
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 143.762843
|
||||
|
||||
→ Running tests/app/is-user-logged-in.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
TAP version 13
|
||||
# Subtest: isUserLoggedIn returns false when no user pubkey is set
|
||||
ok 1 - isUserLoggedIn returns false when no user pubkey is set
|
||||
---
|
||||
duration_ms: 1.383277
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isUserLoggedIn treats extension logins as authenticated
|
||||
ok 2 - isUserLoggedIn treats extension logins as authenticated
|
||||
---
|
||||
duration_ms: 0.414559
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isUserLoggedIn guards against mismatched nostrClient state
|
||||
ok 3 - isUserLoggedIn guards against mismatched nostrClient state
|
||||
---
|
||||
duration_ms: 0.223376
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isUserLoggedIn ignores anonymous session actor mismatches
|
||||
ok 4 - isUserLoggedIn ignores anonymous session actor mismatches
|
||||
---
|
||||
duration_ms: 0.345963
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isUserLoggedIn rejects mismatched managed session actors
|
||||
ok 5 - isUserLoggedIn rejects mismatched managed session actors
|
||||
---
|
||||
duration_ms: 0.265368
|
||||
type: 'test'
|
||||
...
|
||||
1..5
|
||||
# tests 5
|
||||
# suites 0
|
||||
# pass 5
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 31.714232
|
||||
|
||||
→ Running tests/app/moderation-overrides.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
TAP version 13
|
||||
# Subtest: handleModerationOverride decorates stored and current videos then refreshes UI
|
||||
ok 1 - handleModerationOverride decorates stored and current videos then refreshes UI
|
||||
---
|
||||
duration_ms: 214.226302
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handleModerationOverride resumes deferred playback
|
||||
ok 2 - handleModerationOverride resumes deferred playback
|
||||
---
|
||||
duration_ms: 1.308813
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handleModerationBlock requests a block, clears overrides, and refreshes hidden state
|
||||
not ok 3 - handleModerationBlock requests a block, clears overrides, and refreshes hidden state
|
||||
---
|
||||
duration_ms: 4.950644
|
||||
type: 'test'
|
||||
location: '/app/tests/app/moderation-overrides.test.mjs:112:1'
|
||||
failureType: 'testCodeFailure'
|
||||
error: |-
|
||||
Expected values to be strictly equal:
|
||||
|
||||
false !== true
|
||||
|
||||
code: 'ERR_ASSERTION'
|
||||
name: 'AssertionError'
|
||||
expected: true
|
||||
actual: false
|
||||
operator: 'strictEqual'
|
||||
stack: |-
|
||||
TestContext.<anonymous> (file:///app/tests/app/moderation-overrides.test.mjs:228:10)
|
||||
async Test.run (node:internal/test_runner/test:1054:7)
|
||||
async Test.processPendingSubtests (node:internal/test_runner/test:744:7)
|
||||
...
|
||||
# Subtest: handleModerationBlock returns false when viewer is logged out
|
||||
ok 4 - handleModerationBlock returns false when viewer is logged out
|
||||
---
|
||||
duration_ms: 1.626768
|
||||
type: 'test'
|
||||
...
|
||||
1..4
|
||||
# tests 4
|
||||
# suites 0
|
||||
# pass 3
|
||||
# fail 1
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 254.906261
|
||||
file:///app/scripts/run-unit-tests.mjs:68
|
||||
reject(new Error(`${relativePath} failed with exit code ${code}`));
|
||||
^
|
||||
|
||||
Error: tests/app/moderation-overrides.test.mjs failed with exit code 1
|
||||
at ChildProcess.<anonymous> (file:///app/scripts/run-unit-tests.mjs:68:16)
|
||||
at ChildProcess.emit (node:events:519:28)
|
||||
at maybeClose (node:internal/child_process:1101:16)
|
||||
at ChildProcess._handle.onexit (node:internal/child_process:304:5)
|
||||
|
||||
Node.js v22.21.1
|
||||
@@ -1,260 +0,0 @@
|
||||
|
||||
> [email protected] test:unit
|
||||
> node scripts/run-unit-tests.mjs
|
||||
|
||||
|
||||
→ Running tests/app-batch-fetch-profiles.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
[batchFetchProfiles] Failed to fetch profiles from relay wss://fail.example: Error: relay timed out
|
||||
at Object.list (file:///app/tests/app-batch-fetch-profiles.test.mjs:80:31)
|
||||
at file:///app/js/utils/profileBatchFetcher.js:115:10
|
||||
at Array.map (<anonymous>)
|
||||
at batchFetchProfilesFromRelays (file:///app/js/utils/profileBatchFetcher.js:112:75)
|
||||
at TestContext.<anonymous> (file:///app/tests/app-batch-fetch-profiles.test.mjs:87:11)
|
||||
at Test.runInAsyncScope (node:async_hooks:214:14)
|
||||
at Test.run (node:internal/test_runner/test:1047:25)
|
||||
at Test.start (node:internal/test_runner/test:944:17)
|
||||
at startSubtestAfterBootstrap (node:internal/test_runner/harness:296:17)
|
||||
TAP version 13
|
||||
# Subtest: batchFetchProfiles handles fast and failing relays
|
||||
ok 1 - batchFetchProfiles handles fast and failing relays
|
||||
---
|
||||
duration_ms: 4.89647
|
||||
type: 'test'
|
||||
...
|
||||
1..1
|
||||
# tests 1
|
||||
# suites 0
|
||||
# pass 1
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 21.69378
|
||||
|
||||
→ Running tests/app/channel-profile-moderation.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
[feedEngine/moderation] metadata.moderation updated {
|
||||
stage: 'moderation',
|
||||
videoId: 'vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv',
|
||||
blockAutoplay: true,
|
||||
blurThumbnail: true,
|
||||
trustedCount: 2,
|
||||
reportType: 'nudity',
|
||||
hidden: false,
|
||||
hideReason: null,
|
||||
hideBypass: null
|
||||
}
|
||||
TAP version 13
|
||||
# Subtest: renderChannelVideosFromList decorates videos before storing
|
||||
ok 1 - renderChannelVideosFromList decorates videos before storing
|
||||
---
|
||||
duration_ms: 401.108042
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: renderChannelVideosFromList applies moderation blur without existing metadata
|
||||
ok 2 - renderChannelVideosFromList applies moderation blur without existing metadata
|
||||
---
|
||||
duration_ms: 46.542954
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: applyChannelVisualBlur blurs banner and avatar when viewer mutes author
|
||||
ok 3 - applyChannelVisualBlur blurs banner and avatar when viewer mutes author
|
||||
---
|
||||
duration_ms: 15.658716
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: moderation override clears channel blur via event wiring
|
||||
ok 4 - moderation override clears channel blur via event wiring
|
||||
---
|
||||
duration_ms: 52.358724
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: channel header moderation badge reflects blur state and override actions
|
||||
ok 5 - channel header moderation badge reflects blur state and override actions
|
||||
---
|
||||
duration_ms: 41.743826
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: channel video cards update moderation state in place when summary changes
|
||||
ok 6 - channel video cards update moderation state in place when summary changes
|
||||
---
|
||||
duration_ms: 26.080671
|
||||
type: 'test'
|
||||
...
|
||||
1..6
|
||||
# tests 6
|
||||
# suites 0
|
||||
# pass 6
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 611.793776
|
||||
|
||||
→ Running tests/app/hash-change-handler.test.mjs
|
||||
TAP version 13
|
||||
# Subtest: handleHashChange defaults to for-you when logged in
|
||||
ok 1 - handleHashChange defaults to for-you when logged in
|
||||
---
|
||||
duration_ms: 78.541617
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handleHashChange defaults to most-recent-videos when logged out
|
||||
ok 2 - handleHashChange defaults to most-recent-videos when logged out
|
||||
---
|
||||
duration_ms: 10.259655
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handleHashChange respects explicit view regardless of login state
|
||||
ok 3 - handleHashChange respects explicit view regardless of login state
|
||||
---
|
||||
duration_ms: 10.116444
|
||||
type: 'test'
|
||||
...
|
||||
1..3
|
||||
# tests 3
|
||||
# suites 0
|
||||
# pass 3
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 112.397132
|
||||
|
||||
→ Running tests/app/hydrate-sidebar-navigation.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
TAP version 13
|
||||
# Subtest: hydrateSidebarNavigation reveals chrome controls for authenticated viewers
|
||||
ok 1 - hydrateSidebarNavigation reveals chrome controls for authenticated viewers
|
||||
---
|
||||
duration_ms: 98.541032
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: hydrateSidebarNavigation hides chrome controls for logged-out viewers
|
||||
ok 2 - hydrateSidebarNavigation hides chrome controls for logged-out viewers
|
||||
---
|
||||
duration_ms: 15.672259
|
||||
type: 'test'
|
||||
...
|
||||
1..2
|
||||
# tests 2
|
||||
# suites 0
|
||||
# pass 2
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 131.789275
|
||||
|
||||
→ Running tests/app/is-user-logged-in.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
TAP version 13
|
||||
# Subtest: isUserLoggedIn returns false when no user pubkey is set
|
||||
ok 1 - isUserLoggedIn returns false when no user pubkey is set
|
||||
---
|
||||
duration_ms: 1.459953
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isUserLoggedIn treats extension logins as authenticated
|
||||
ok 2 - isUserLoggedIn treats extension logins as authenticated
|
||||
---
|
||||
duration_ms: 0.427722
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isUserLoggedIn guards against mismatched nostrClient state
|
||||
ok 3 - isUserLoggedIn guards against mismatched nostrClient state
|
||||
---
|
||||
duration_ms: 0.232365
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isUserLoggedIn ignores anonymous session actor mismatches
|
||||
ok 4 - isUserLoggedIn ignores anonymous session actor mismatches
|
||||
---
|
||||
duration_ms: 0.295374
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isUserLoggedIn rejects mismatched managed session actors
|
||||
ok 5 - isUserLoggedIn rejects mismatched managed session actors
|
||||
---
|
||||
duration_ms: 0.263757
|
||||
type: 'test'
|
||||
...
|
||||
1..5
|
||||
# tests 5
|
||||
# suites 0
|
||||
# pass 5
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 32.877837
|
||||
|
||||
→ Running tests/app/moderation-overrides.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
TAP version 13
|
||||
# Subtest: handleModerationOverride decorates stored and current videos then refreshes UI
|
||||
ok 1 - handleModerationOverride decorates stored and current videos then refreshes UI
|
||||
---
|
||||
duration_ms: 230.312105
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handleModerationOverride resumes deferred playback
|
||||
ok 2 - handleModerationOverride resumes deferred playback
|
||||
---
|
||||
duration_ms: 1.320201
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handleModerationBlock requests a block, clears overrides, and refreshes hidden state
|
||||
not ok 3 - handleModerationBlock requests a block, clears overrides, and refreshes hidden state
|
||||
---
|
||||
duration_ms: 4.990623
|
||||
type: 'test'
|
||||
location: '/app/tests/app/moderation-overrides.test.mjs:112:1'
|
||||
failureType: 'testCodeFailure'
|
||||
error: |-
|
||||
Expected values to be strictly equal:
|
||||
|
||||
false !== true
|
||||
|
||||
code: 'ERR_ASSERTION'
|
||||
name: 'AssertionError'
|
||||
expected: true
|
||||
actual: false
|
||||
operator: 'strictEqual'
|
||||
stack: |-
|
||||
TestContext.<anonymous> (file:///app/tests/app/moderation-overrides.test.mjs:228:10)
|
||||
async Test.run (node:internal/test_runner/test:1054:7)
|
||||
async Test.processPendingSubtests (node:internal/test_runner/test:744:7)
|
||||
...
|
||||
# Subtest: handleModerationBlock returns false when viewer is logged out
|
||||
ok 4 - handleModerationBlock returns false when viewer is logged out
|
||||
---
|
||||
duration_ms: 1.778329
|
||||
type: 'test'
|
||||
...
|
||||
1..4
|
||||
# tests 4
|
||||
# suites 0
|
||||
# pass 3
|
||||
# fail 1
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 271.042194
|
||||
file:///app/scripts/run-unit-tests.mjs:68
|
||||
reject(new Error(`${relativePath} failed with exit code ${code}`));
|
||||
^
|
||||
|
||||
Error: tests/app/moderation-overrides.test.mjs failed with exit code 1
|
||||
at ChildProcess.<anonymous> (file:///app/scripts/run-unit-tests.mjs:68:16)
|
||||
at ChildProcess.emit (node:events:519:28)
|
||||
at maybeClose (node:internal/child_process:1101:16)
|
||||
at ChildProcess._handle.onexit (node:internal/child_process:304:5)
|
||||
|
||||
Node.js v22.21.1
|
||||
@@ -1,305 +0,0 @@
|
||||
|
||||
> [email protected] test:unit
|
||||
> node scripts/run-unit-tests.mjs
|
||||
|
||||
|
||||
→ Running tests/app-batch-fetch-profiles.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
[batchFetchProfiles] Failed to fetch profiles from relay wss://fail.example: Error: relay timed out
|
||||
at Object.list (file:///app/tests/app-batch-fetch-profiles.test.mjs:80:31)
|
||||
at file:///app/js/utils/profileBatchFetcher.js:115:10
|
||||
at Array.map (<anonymous>)
|
||||
at batchFetchProfilesFromRelays (file:///app/js/utils/profileBatchFetcher.js:112:75)
|
||||
at TestContext.<anonymous> (file:///app/tests/app-batch-fetch-profiles.test.mjs:87:11)
|
||||
at Test.runInAsyncScope (node:async_hooks:214:14)
|
||||
at Test.run (node:internal/test_runner/test:1047:25)
|
||||
at Test.start (node:internal/test_runner/test:944:17)
|
||||
at startSubtestAfterBootstrap (node:internal/test_runner/harness:296:17)
|
||||
TAP version 13
|
||||
# Subtest: batchFetchProfiles handles fast and failing relays
|
||||
ok 1 - batchFetchProfiles handles fast and failing relays
|
||||
---
|
||||
duration_ms: 7.977402
|
||||
type: 'test'
|
||||
...
|
||||
1..1
|
||||
# tests 1
|
||||
# suites 0
|
||||
# pass 1
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 22.241514
|
||||
|
||||
→ Running tests/app/channel-profile-moderation.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
[feedEngine/moderation] metadata.moderation updated {
|
||||
stage: 'moderation',
|
||||
videoId: 'vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv',
|
||||
blockAutoplay: true,
|
||||
blurThumbnail: true,
|
||||
trustedCount: 2,
|
||||
reportType: 'nudity',
|
||||
hidden: false,
|
||||
hideReason: null,
|
||||
hideBypass: null
|
||||
}
|
||||
TAP version 13
|
||||
# Subtest: renderChannelVideosFromList decorates videos before storing
|
||||
ok 1 - renderChannelVideosFromList decorates videos before storing
|
||||
---
|
||||
duration_ms: 379.80434
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: renderChannelVideosFromList applies moderation blur without existing metadata
|
||||
ok 2 - renderChannelVideosFromList applies moderation blur without existing metadata
|
||||
---
|
||||
duration_ms: 45.289258
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: applyChannelVisualBlur blurs banner and avatar when viewer mutes author
|
||||
ok 3 - applyChannelVisualBlur blurs banner and avatar when viewer mutes author
|
||||
---
|
||||
duration_ms: 15.951023
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: moderation override clears channel blur via event wiring
|
||||
ok 4 - moderation override clears channel blur via event wiring
|
||||
---
|
||||
duration_ms: 45.789308
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: channel header moderation badge reflects blur state and override actions
|
||||
ok 5 - channel header moderation badge reflects blur state and override actions
|
||||
---
|
||||
duration_ms: 42.447356
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: channel video cards update moderation state in place when summary changes
|
||||
ok 6 - channel video cards update moderation state in place when summary changes
|
||||
---
|
||||
duration_ms: 25.597118
|
||||
type: 'test'
|
||||
...
|
||||
1..6
|
||||
# tests 6
|
||||
# suites 0
|
||||
# pass 6
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 568.177635
|
||||
|
||||
→ Running tests/app/hash-change-handler.test.mjs
|
||||
TAP version 13
|
||||
# Subtest: handleHashChange defaults to for-you when logged in
|
||||
ok 1 - handleHashChange defaults to for-you when logged in
|
||||
---
|
||||
duration_ms: 75.772174
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handleHashChange defaults to most-recent-videos when logged out
|
||||
ok 2 - handleHashChange defaults to most-recent-videos when logged out
|
||||
---
|
||||
duration_ms: 9.627833
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handleHashChange respects explicit view regardless of login state
|
||||
ok 3 - handleHashChange respects explicit view regardless of login state
|
||||
---
|
||||
duration_ms: 10.030577
|
||||
type: 'test'
|
||||
...
|
||||
1..3
|
||||
# tests 3
|
||||
# suites 0
|
||||
# pass 3
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 108.647336
|
||||
|
||||
→ Running tests/app/hydrate-sidebar-navigation.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
TAP version 13
|
||||
# Subtest: hydrateSidebarNavigation reveals chrome controls for authenticated viewers
|
||||
ok 1 - hydrateSidebarNavigation reveals chrome controls for authenticated viewers
|
||||
---
|
||||
duration_ms: 118.594258
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: hydrateSidebarNavigation hides chrome controls for logged-out viewers
|
||||
ok 2 - hydrateSidebarNavigation hides chrome controls for logged-out viewers
|
||||
---
|
||||
duration_ms: 27.333658
|
||||
type: 'test'
|
||||
...
|
||||
1..2
|
||||
# tests 2
|
||||
# suites 0
|
||||
# pass 2
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 161.988571
|
||||
|
||||
→ Running tests/app/is-user-logged-in.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
TAP version 13
|
||||
# Subtest: isUserLoggedIn returns false when no user pubkey is set
|
||||
ok 1 - isUserLoggedIn returns false when no user pubkey is set
|
||||
---
|
||||
duration_ms: 1.780936
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isUserLoggedIn treats extension logins as authenticated
|
||||
ok 2 - isUserLoggedIn treats extension logins as authenticated
|
||||
---
|
||||
duration_ms: 0.469339
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isUserLoggedIn guards against mismatched nostrClient state
|
||||
ok 3 - isUserLoggedIn guards against mismatched nostrClient state
|
||||
---
|
||||
duration_ms: 0.229676
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isUserLoggedIn ignores anonymous session actor mismatches
|
||||
ok 4 - isUserLoggedIn ignores anonymous session actor mismatches
|
||||
---
|
||||
duration_ms: 0.274654
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isUserLoggedIn rejects mismatched managed session actors
|
||||
ok 5 - isUserLoggedIn rejects mismatched managed session actors
|
||||
---
|
||||
duration_ms: 0.278603
|
||||
type: 'test'
|
||||
...
|
||||
1..5
|
||||
# tests 5
|
||||
# suites 0
|
||||
# pass 5
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 35.209771
|
||||
|
||||
→ Running tests/app/moderation-overrides.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
TAP version 13
|
||||
# Subtest: handleModerationOverride decorates stored and current videos then refreshes UI
|
||||
not ok 1 - handleModerationOverride decorates stored and current videos then refreshes UI
|
||||
---
|
||||
duration_ms: 228.266794
|
||||
type: 'test'
|
||||
location: '/app/tests/app/moderation-overrides.test.mjs:27:1'
|
||||
failureType: 'testCodeFailure'
|
||||
error: |-
|
||||
Expected values to be strictly equal:
|
||||
+ actual - expected
|
||||
|
||||
+ undefined
|
||||
- true
|
||||
|
||||
code: 'ERR_ASSERTION'
|
||||
name: 'AssertionError'
|
||||
expected: true
|
||||
operator: 'strictEqual'
|
||||
stack: |-
|
||||
TestContext.<anonymous> (file:///app/tests/app/moderation-overrides.test.mjs:67:10)
|
||||
async Test.run (node:internal/test_runner/test:1054:7)
|
||||
async startSubtestAfterBootstrap (node:internal/test_runner/harness:296:3)
|
||||
...
|
||||
# Subtest: handleModerationOverride resumes deferred playback
|
||||
not ok 2 - handleModerationOverride resumes deferred playback
|
||||
---
|
||||
duration_ms: 2.019286
|
||||
type: 'test'
|
||||
location: '/app/tests/app/moderation-overrides.test.mjs:75:1'
|
||||
failureType: 'testCodeFailure'
|
||||
error: |-
|
||||
Expected values to be strictly equal:
|
||||
+ actual - expected
|
||||
|
||||
+ {
|
||||
+ magnet: '',
|
||||
+ triggerProvided: false,
|
||||
+ url: 'https://example.com/video.mp4',
|
||||
+ videoId: 'dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd'
|
||||
+ }
|
||||
- null
|
||||
|
||||
code: 'ERR_ASSERTION'
|
||||
name: 'AssertionError'
|
||||
expected: ~
|
||||
actual:
|
||||
url: 'https://example.com/video.mp4'
|
||||
magnet: ''
|
||||
triggerProvided: false
|
||||
videoId: 'dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd'
|
||||
operator: 'strictEqual'
|
||||
stack: |-
|
||||
TestContext.<anonymous> (file:///app/tests/app/moderation-overrides.test.mjs:104:10)
|
||||
async Test.run (node:internal/test_runner/test:1054:7)
|
||||
async Test.processPendingSubtests (node:internal/test_runner/test:744:7)
|
||||
...
|
||||
# Subtest: handleModerationBlock requests a block, clears overrides, and refreshes hidden state
|
||||
not ok 3 - handleModerationBlock requests a block, clears overrides, and refreshes hidden state
|
||||
---
|
||||
duration_ms: 2.784959
|
||||
type: 'test'
|
||||
location: '/app/tests/app/moderation-overrides.test.mjs:112:1'
|
||||
failureType: 'testCodeFailure'
|
||||
error: |-
|
||||
Expected values to be strictly equal:
|
||||
+ actual - expected
|
||||
|
||||
+ undefined
|
||||
- true
|
||||
|
||||
code: 'ERR_ASSERTION'
|
||||
name: 'AssertionError'
|
||||
expected: true
|
||||
operator: 'strictEqual'
|
||||
stack: |-
|
||||
TestContext.<anonymous> (file:///app/tests/app/moderation-overrides.test.mjs:202:10)
|
||||
async Test.run (node:internal/test_runner/test:1054:7)
|
||||
async Test.processPendingSubtests (node:internal/test_runner/test:744:7)
|
||||
...
|
||||
# Subtest: handleModerationBlock returns false when viewer is logged out
|
||||
ok 4 - handleModerationBlock returns false when viewer is logged out
|
||||
---
|
||||
duration_ms: 2.057327
|
||||
type: 'test'
|
||||
...
|
||||
1..4
|
||||
# tests 4
|
||||
# suites 0
|
||||
# pass 1
|
||||
# fail 3
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 267.221529
|
||||
file:///app/scripts/run-unit-tests.mjs:68
|
||||
reject(new Error(`${relativePath} failed with exit code ${code}`));
|
||||
^
|
||||
|
||||
Error: tests/app/moderation-overrides.test.mjs failed with exit code 1
|
||||
at ChildProcess.<anonymous> (file:///app/scripts/run-unit-tests.mjs:68:16)
|
||||
at ChildProcess.emit (node:events:519:28)
|
||||
at maybeClose (node:internal/child_process:1101:16)
|
||||
at ChildProcess._handle.onexit (node:internal/child_process:304:5)
|
||||
|
||||
Node.js v22.21.1
|
||||
@@ -1,287 +0,0 @@
|
||||
|
||||
> [email protected] test:unit
|
||||
> node scripts/run-unit-tests.mjs
|
||||
|
||||
|
||||
→ Running tests/app-batch-fetch-profiles.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
[batchFetchProfiles] Failed to fetch profiles from relay wss://fail.example: Error: relay timed out
|
||||
at Object.list (file:///app/tests/app-batch-fetch-profiles.test.mjs:80:31)
|
||||
at file:///app/js/utils/profileBatchFetcher.js:115:10
|
||||
at Array.map (<anonymous>)
|
||||
at batchFetchProfilesFromRelays (file:///app/js/utils/profileBatchFetcher.js:112:75)
|
||||
at TestContext.<anonymous> (file:///app/tests/app-batch-fetch-profiles.test.mjs:87:11)
|
||||
at Test.runInAsyncScope (node:async_hooks:214:14)
|
||||
at Test.run (node:internal/test_runner/test:1047:25)
|
||||
at Test.start (node:internal/test_runner/test:944:17)
|
||||
at startSubtestAfterBootstrap (node:internal/test_runner/harness:296:17)
|
||||
TAP version 13
|
||||
# Subtest: batchFetchProfiles handles fast and failing relays
|
||||
ok 1 - batchFetchProfiles handles fast and failing relays
|
||||
---
|
||||
duration_ms: 4.68097
|
||||
type: 'test'
|
||||
...
|
||||
1..1
|
||||
# tests 1
|
||||
# suites 0
|
||||
# pass 1
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 18.751403
|
||||
|
||||
→ Running tests/app/channel-profile-moderation.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
[feedEngine/moderation] metadata.moderation updated {
|
||||
stage: 'moderation',
|
||||
videoId: 'vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv',
|
||||
blockAutoplay: true,
|
||||
blurThumbnail: true,
|
||||
trustedCount: 2,
|
||||
reportType: 'nudity',
|
||||
hidden: false,
|
||||
hideReason: null,
|
||||
hideBypass: null
|
||||
}
|
||||
TAP version 13
|
||||
# Subtest: renderChannelVideosFromList decorates videos before storing
|
||||
ok 1 - renderChannelVideosFromList decorates videos before storing
|
||||
---
|
||||
duration_ms: 249.242079
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: renderChannelVideosFromList applies moderation blur without existing metadata
|
||||
ok 2 - renderChannelVideosFromList applies moderation blur without existing metadata
|
||||
---
|
||||
duration_ms: 34.522355
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: applyChannelVisualBlur blurs banner and avatar when viewer mutes author
|
||||
ok 3 - applyChannelVisualBlur blurs banner and avatar when viewer mutes author
|
||||
---
|
||||
duration_ms: 11.527787
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: moderation override clears channel blur via event wiring
|
||||
ok 4 - moderation override clears channel blur via event wiring
|
||||
---
|
||||
duration_ms: 39.046527
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: channel header moderation badge reflects blur state and override actions
|
||||
ok 5 - channel header moderation badge reflects blur state and override actions
|
||||
---
|
||||
duration_ms: 34.441459
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: channel video cards update moderation state in place when summary changes
|
||||
ok 6 - channel video cards update moderation state in place when summary changes
|
||||
---
|
||||
duration_ms: 23.360676
|
||||
type: 'test'
|
||||
...
|
||||
1..6
|
||||
# tests 6
|
||||
# suites 0
|
||||
# pass 6
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 404.34229
|
||||
|
||||
→ Running tests/app/hash-change-handler.test.mjs
|
||||
TAP version 13
|
||||
# Subtest: handleHashChange defaults to for-you when logged in
|
||||
ok 1 - handleHashChange defaults to for-you when logged in
|
||||
---
|
||||
duration_ms: 1009.599136
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handleHashChange defaults to most-recent-videos when logged out
|
||||
ok 2 - handleHashChange defaults to most-recent-videos when logged out
|
||||
---
|
||||
duration_ms: 73.745699
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handleHashChange respects explicit view regardless of login state
|
||||
ok 3 - handleHashChange respects explicit view regardless of login state
|
||||
---
|
||||
duration_ms: 33.538414
|
||||
type: 'test'
|
||||
...
|
||||
1..3
|
||||
# tests 3
|
||||
# suites 0
|
||||
# pass 3
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 1164.107182
|
||||
|
||||
→ Running tests/app/hydrate-sidebar-navigation.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
TAP version 13
|
||||
# Subtest: hydrateSidebarNavigation reveals chrome controls for authenticated viewers
|
||||
ok 1 - hydrateSidebarNavigation reveals chrome controls for authenticated viewers
|
||||
---
|
||||
duration_ms: 123.254594
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: hydrateSidebarNavigation hides chrome controls for logged-out viewers
|
||||
ok 2 - hydrateSidebarNavigation hides chrome controls for logged-out viewers
|
||||
---
|
||||
duration_ms: 17.578009
|
||||
type: 'test'
|
||||
...
|
||||
1..2
|
||||
# tests 2
|
||||
# suites 0
|
||||
# pass 2
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 173.980931
|
||||
|
||||
→ Running tests/app/is-user-logged-in.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
TAP version 13
|
||||
# Subtest: isUserLoggedIn returns false when no user pubkey is set
|
||||
ok 1 - isUserLoggedIn returns false when no user pubkey is set
|
||||
---
|
||||
duration_ms: 1.547337
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isUserLoggedIn treats extension logins as authenticated
|
||||
ok 2 - isUserLoggedIn treats extension logins as authenticated
|
||||
---
|
||||
duration_ms: 0.411532
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isUserLoggedIn guards against mismatched nostrClient state
|
||||
ok 3 - isUserLoggedIn guards against mismatched nostrClient state
|
||||
---
|
||||
duration_ms: 0.230064
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isUserLoggedIn ignores anonymous session actor mismatches
|
||||
ok 4 - isUserLoggedIn ignores anonymous session actor mismatches
|
||||
---
|
||||
duration_ms: 0.402138
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isUserLoggedIn rejects mismatched managed session actors
|
||||
ok 5 - isUserLoggedIn rejects mismatched managed session actors
|
||||
---
|
||||
duration_ms: 0.24381
|
||||
type: 'test'
|
||||
...
|
||||
1..5
|
||||
# tests 5
|
||||
# suites 0
|
||||
# pass 5
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 48.612244
|
||||
|
||||
→ Running tests/app/moderation-overrides.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
TAP version 13
|
||||
# Subtest: handleModerationOverride decorates stored and current videos then refreshes UI
|
||||
ok 1 - handleModerationOverride decorates stored and current videos then refreshes UI
|
||||
---
|
||||
duration_ms: 244.260716
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handleModerationOverride resumes deferred playback
|
||||
not ok 2 - handleModerationOverride resumes deferred playback
|
||||
---
|
||||
duration_ms: 3.378509
|
||||
type: 'test'
|
||||
location: '/app/tests/app/moderation-overrides.test.mjs:75:1'
|
||||
failureType: 'testCodeFailure'
|
||||
error: |-
|
||||
Expected values to be strictly equal:
|
||||
+ actual - expected
|
||||
|
||||
+ {
|
||||
+ magnet: '',
|
||||
+ triggerProvided: false,
|
||||
+ url: 'https://example.com/video.mp4',
|
||||
+ videoId: 'dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd'
|
||||
+ }
|
||||
- null
|
||||
|
||||
code: 'ERR_ASSERTION'
|
||||
name: 'AssertionError'
|
||||
expected: ~
|
||||
actual:
|
||||
url: 'https://example.com/video.mp4'
|
||||
magnet: ''
|
||||
triggerProvided: false
|
||||
videoId: 'dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd'
|
||||
operator: 'strictEqual'
|
||||
stack: |-
|
||||
TestContext.<anonymous> (file:///app/tests/app/moderation-overrides.test.mjs:104:10)
|
||||
async Test.run (node:internal/test_runner/test:1054:7)
|
||||
async Test.processPendingSubtests (node:internal/test_runner/test:744:7)
|
||||
...
|
||||
# Subtest: handleModerationBlock requests a block, clears overrides, and refreshes hidden state
|
||||
not ok 3 - handleModerationBlock requests a block, clears overrides, and refreshes hidden state
|
||||
---
|
||||
duration_ms: 4.927295
|
||||
type: 'test'
|
||||
location: '/app/tests/app/moderation-overrides.test.mjs:112:1'
|
||||
failureType: 'testCodeFailure'
|
||||
error: |-
|
||||
Expected values to be strictly equal:
|
||||
|
||||
false !== true
|
||||
|
||||
code: 'ERR_ASSERTION'
|
||||
name: 'AssertionError'
|
||||
expected: true
|
||||
actual: false
|
||||
operator: 'strictEqual'
|
||||
stack: |-
|
||||
TestContext.<anonymous> (file:///app/tests/app/moderation-overrides.test.mjs:228:10)
|
||||
async Test.run (node:internal/test_runner/test:1054:7)
|
||||
async Test.processPendingSubtests (node:internal/test_runner/test:744:7)
|
||||
...
|
||||
# Subtest: handleModerationBlock returns false when viewer is logged out
|
||||
ok 4 - handleModerationBlock returns false when viewer is logged out
|
||||
---
|
||||
duration_ms: 1.922279
|
||||
type: 'test'
|
||||
...
|
||||
1..4
|
||||
# tests 4
|
||||
# suites 0
|
||||
# pass 2
|
||||
# fail 2
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 287.75859
|
||||
file:///app/scripts/run-unit-tests.mjs:68
|
||||
reject(new Error(`${relativePath} failed with exit code ${code}`));
|
||||
^
|
||||
|
||||
Error: tests/app/moderation-overrides.test.mjs failed with exit code 1
|
||||
at ChildProcess.<anonymous> (file:///app/scripts/run-unit-tests.mjs:68:16)
|
||||
at ChildProcess.emit (node:events:519:28)
|
||||
at maybeClose (node:internal/child_process:1101:16)
|
||||
at ChildProcess._handle.onexit (node:internal/child_process:304:5)
|
||||
|
||||
Node.js v22.21.1
|
||||
@@ -1,260 +0,0 @@
|
||||
|
||||
> [email protected] test:unit
|
||||
> node scripts/run-unit-tests.mjs
|
||||
|
||||
|
||||
→ Running tests/app-batch-fetch-profiles.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
[batchFetchProfiles] Failed to fetch profiles from relay wss://fail.example: Error: relay timed out
|
||||
at Object.list (file:///app/tests/app-batch-fetch-profiles.test.mjs:80:31)
|
||||
at file:///app/js/utils/profileBatchFetcher.js:115:10
|
||||
at Array.map (<anonymous>)
|
||||
at batchFetchProfilesFromRelays (file:///app/js/utils/profileBatchFetcher.js:112:75)
|
||||
at TestContext.<anonymous> (file:///app/tests/app-batch-fetch-profiles.test.mjs:87:11)
|
||||
at Test.runInAsyncScope (node:async_hooks:214:14)
|
||||
at Test.run (node:internal/test_runner/test:1047:25)
|
||||
at Test.start (node:internal/test_runner/test:944:17)
|
||||
at startSubtestAfterBootstrap (node:internal/test_runner/harness:296:17)
|
||||
TAP version 13
|
||||
# Subtest: batchFetchProfiles handles fast and failing relays
|
||||
ok 1 - batchFetchProfiles handles fast and failing relays
|
||||
---
|
||||
duration_ms: 6.00491
|
||||
type: 'test'
|
||||
...
|
||||
1..1
|
||||
# tests 1
|
||||
# suites 0
|
||||
# pass 1
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 32.022592
|
||||
|
||||
→ Running tests/app/channel-profile-moderation.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
[feedEngine/moderation] metadata.moderation updated {
|
||||
stage: 'moderation',
|
||||
videoId: 'vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv',
|
||||
blockAutoplay: true,
|
||||
blurThumbnail: true,
|
||||
trustedCount: 2,
|
||||
reportType: 'nudity',
|
||||
hidden: false,
|
||||
hideReason: null,
|
||||
hideBypass: null
|
||||
}
|
||||
TAP version 13
|
||||
# Subtest: renderChannelVideosFromList decorates videos before storing
|
||||
ok 1 - renderChannelVideosFromList decorates videos before storing
|
||||
---
|
||||
duration_ms: 375.346278
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: renderChannelVideosFromList applies moderation blur without existing metadata
|
||||
ok 2 - renderChannelVideosFromList applies moderation blur without existing metadata
|
||||
---
|
||||
duration_ms: 37.760277
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: applyChannelVisualBlur blurs banner and avatar when viewer mutes author
|
||||
ok 3 - applyChannelVisualBlur blurs banner and avatar when viewer mutes author
|
||||
---
|
||||
duration_ms: 14.528741
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: moderation override clears channel blur via event wiring
|
||||
ok 4 - moderation override clears channel blur via event wiring
|
||||
---
|
||||
duration_ms: 47.192924
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: channel header moderation badge reflects blur state and override actions
|
||||
ok 5 - channel header moderation badge reflects blur state and override actions
|
||||
---
|
||||
duration_ms: 39.987443
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: channel video cards update moderation state in place when summary changes
|
||||
ok 6 - channel video cards update moderation state in place when summary changes
|
||||
---
|
||||
duration_ms: 24.837088
|
||||
type: 'test'
|
||||
...
|
||||
1..6
|
||||
# tests 6
|
||||
# suites 0
|
||||
# pass 6
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 553.202787
|
||||
|
||||
→ Running tests/app/hash-change-handler.test.mjs
|
||||
TAP version 13
|
||||
# Subtest: handleHashChange defaults to for-you when logged in
|
||||
ok 1 - handleHashChange defaults to for-you when logged in
|
||||
---
|
||||
duration_ms: 73.049804
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handleHashChange defaults to most-recent-videos when logged out
|
||||
ok 2 - handleHashChange defaults to most-recent-videos when logged out
|
||||
---
|
||||
duration_ms: 9.496508
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handleHashChange respects explicit view regardless of login state
|
||||
ok 3 - handleHashChange respects explicit view regardless of login state
|
||||
---
|
||||
duration_ms: 9.841895
|
||||
type: 'test'
|
||||
...
|
||||
1..3
|
||||
# tests 3
|
||||
# suites 0
|
||||
# pass 3
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 105.172847
|
||||
|
||||
→ Running tests/app/hydrate-sidebar-navigation.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
TAP version 13
|
||||
# Subtest: hydrateSidebarNavigation reveals chrome controls for authenticated viewers
|
||||
ok 1 - hydrateSidebarNavigation reveals chrome controls for authenticated viewers
|
||||
---
|
||||
duration_ms: 91.833717
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: hydrateSidebarNavigation hides chrome controls for logged-out viewers
|
||||
ok 2 - hydrateSidebarNavigation hides chrome controls for logged-out viewers
|
||||
---
|
||||
duration_ms: 13.635597
|
||||
type: 'test'
|
||||
...
|
||||
1..2
|
||||
# tests 2
|
||||
# suites 0
|
||||
# pass 2
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 122.580199
|
||||
|
||||
→ Running tests/app/is-user-logged-in.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
TAP version 13
|
||||
# Subtest: isUserLoggedIn returns false when no user pubkey is set
|
||||
ok 1 - isUserLoggedIn returns false when no user pubkey is set
|
||||
---
|
||||
duration_ms: 1.302074
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isUserLoggedIn treats extension logins as authenticated
|
||||
ok 2 - isUserLoggedIn treats extension logins as authenticated
|
||||
---
|
||||
duration_ms: 0.407277
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isUserLoggedIn guards against mismatched nostrClient state
|
||||
ok 3 - isUserLoggedIn guards against mismatched nostrClient state
|
||||
---
|
||||
duration_ms: 0.283539
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isUserLoggedIn ignores anonymous session actor mismatches
|
||||
ok 4 - isUserLoggedIn ignores anonymous session actor mismatches
|
||||
---
|
||||
duration_ms: 0.252445
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: isUserLoggedIn rejects mismatched managed session actors
|
||||
ok 5 - isUserLoggedIn rejects mismatched managed session actors
|
||||
---
|
||||
duration_ms: 0.383152
|
||||
type: 'test'
|
||||
...
|
||||
1..5
|
||||
# tests 5
|
||||
# suites 0
|
||||
# pass 5
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 34.198852
|
||||
|
||||
→ Running tests/app/moderation-overrides.test.mjs
|
||||
[bitvid] Initialized nostr nip04 helpers.
|
||||
[bitvid] Initialized nostr nip44 helpers.
|
||||
TAP version 13
|
||||
# Subtest: handleModerationOverride decorates stored and current videos then refreshes UI
|
||||
ok 1 - handleModerationOverride decorates stored and current videos then refreshes UI
|
||||
---
|
||||
duration_ms: 210.938803
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handleModerationOverride resumes deferred playback
|
||||
ok 2 - handleModerationOverride resumes deferred playback
|
||||
---
|
||||
duration_ms: 1.300514
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: handleModerationBlock requests a block, clears overrides, and refreshes hidden state
|
||||
not ok 3 - handleModerationBlock requests a block, clears overrides, and refreshes hidden state
|
||||
---
|
||||
duration_ms: 4.873851
|
||||
type: 'test'
|
||||
location: '/app/tests/app/moderation-overrides.test.mjs:112:1'
|
||||
failureType: 'testCodeFailure'
|
||||
error: |-
|
||||
Expected values to be strictly equal:
|
||||
|
||||
false !== true
|
||||
|
||||
code: 'ERR_ASSERTION'
|
||||
name: 'AssertionError'
|
||||
expected: true
|
||||
actual: false
|
||||
operator: 'strictEqual'
|
||||
stack: |-
|
||||
TestContext.<anonymous> (file:///app/tests/app/moderation-overrides.test.mjs:228:10)
|
||||
async Test.run (node:internal/test_runner/test:1054:7)
|
||||
async Test.processPendingSubtests (node:internal/test_runner/test:744:7)
|
||||
...
|
||||
# Subtest: handleModerationBlock returns false when viewer is logged out
|
||||
ok 4 - handleModerationBlock returns false when viewer is logged out
|
||||
---
|
||||
duration_ms: 1.847791
|
||||
type: 'test'
|
||||
...
|
||||
1..4
|
||||
# tests 4
|
||||
# suites 0
|
||||
# pass 3
|
||||
# fail 1
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 253.404435
|
||||
file:///app/scripts/run-unit-tests.mjs:68
|
||||
reject(new Error(`${relativePath} failed with exit code ${code}`));
|
||||
^
|
||||
|
||||
Error: tests/app/moderation-overrides.test.mjs failed with exit code 1
|
||||
at ChildProcess.<anonymous> (file:///app/scripts/run-unit-tests.mjs:68:16)
|
||||
at ChildProcess.emit (node:events:519:28)
|
||||
at maybeClose (node:internal/child_process:1101:16)
|
||||
at ChildProcess._handle.onexit (node:internal/child_process:304:5)
|
||||
|
||||
Node.js v22.21.1
|
||||
@@ -271,6 +271,7 @@ export async function createModerationAppHarness(options = {}) {
|
||||
Application.prototype.normalizeModerationSettings;
|
||||
app.getActiveModerationThresholds =
|
||||
Application.prototype.getActiveModerationThresholds;
|
||||
app.normalizeHexPubkey = Application.prototype.normalizeHexPubkey;
|
||||
|
||||
if (options.userBlocks) {
|
||||
app.isAuthorBlocked = function (pubkey) {
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
|
||||
import { subscriptions } from './js/subscriptions.js';
|
||||
import { hashtagPreferences } from './js/services/hashtagPreferencesService.js';
|
||||
import { profileCache } from './js/state/profileCache.js';
|
||||
|
||||
// Mock profileCache.getProfileData
|
||||
const originalGetProfileData = profileCache.getProfileData;
|
||||
const originalGet = profileCache.get;
|
||||
|
||||
let calls = [];
|
||||
|
||||
profileCache.getProfileData = (pubkey, section) => {
|
||||
calls.push({ method: 'getProfileData', pubkey, section });
|
||||
return null;
|
||||
};
|
||||
|
||||
profileCache.get = (section) => {
|
||||
calls.push({ method: 'get', section });
|
||||
return null;
|
||||
};
|
||||
|
||||
async function runVerify() {
|
||||
console.log("Verifying fix...");
|
||||
|
||||
// Test SubscriptionsManager
|
||||
const subPubkey = "0000000000000000000000000000000000000000000000000000000000000001";
|
||||
// We need to mock updateFromRelays to avoid network calls, or just catch error
|
||||
subscriptions.updateFromRelays = async () => {};
|
||||
|
||||
await subscriptions.loadSubscriptions(subPubkey);
|
||||
|
||||
const subCall = calls.find(c => c.section === "subscriptions");
|
||||
if (subCall && subCall.method === "getProfileData" && subCall.pubkey === subPubkey) {
|
||||
console.log("PASS: subscriptions.loadSubscriptions used getProfileData with correct pubkey.");
|
||||
} else {
|
||||
console.error("FAIL: subscriptions.loadSubscriptions did not use getProfileData correctly.", calls);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
calls = []; // Reset
|
||||
|
||||
// Test HashtagPreferencesService
|
||||
const tagPubkey = "0000000000000000000000000000000000000000000000000000000000000002";
|
||||
// Mock load logic to avoid network
|
||||
hashtagPreferences.loadFromCache(tagPubkey);
|
||||
|
||||
const tagCall = calls.find(c => c.section === "interests");
|
||||
if (tagCall && tagCall.method === "getProfileData" && tagCall.pubkey === tagPubkey) {
|
||||
console.log("PASS: hashtagPreferences.loadFromCache used getProfileData with correct pubkey.");
|
||||
} else {
|
||||
console.error("FAIL: hashtagPreferences.loadFromCache did not use getProfileData correctly.", calls);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
console.log("All verifications passed.");
|
||||
}
|
||||
|
||||
runVerify().catch(err => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
@@ -1,91 +0,0 @@
|
||||
from playwright.sync_api import sync_playwright
|
||||
import time
|
||||
|
||||
def verify_source_toggle():
|
||||
with sync_playwright() as p:
|
||||
browser = p.chromium.launch(headless=True)
|
||||
page = browser.new_page()
|
||||
|
||||
# Navigate to the local server
|
||||
page.goto("http://localhost:8080/index.html")
|
||||
|
||||
# Wait for the app to initialize (give it a moment)
|
||||
page.wait_for_load_state("networkidle")
|
||||
|
||||
# We need to simulate opening the modal with a video that has both sources
|
||||
# We'll use page.evaluate to interact with the Javascript context
|
||||
# Assuming 'app' is globally available or we can instantiate VideoModal
|
||||
|
||||
page.evaluate("""
|
||||
async () => {
|
||||
// Mock a video object with both URL and Magnet
|
||||
const mockVideo = {
|
||||
id: 'test-video-123',
|
||||
title: 'Test Video with Source Toggle',
|
||||
url: 'https://example.com/video.mp4',
|
||||
magnet: 'magnet:?xt=urn:btih:example',
|
||||
torrentSupported: true,
|
||||
moderation: {}
|
||||
};
|
||||
|
||||
// Access the global app instance or find the video modal
|
||||
// Looking at js/app.js, it might attach to window.app
|
||||
// If not, we might need to find the modal instance another way.
|
||||
|
||||
// Let's assume window.app exists as is common in these setups,
|
||||
// or we try to find the modal controller.
|
||||
|
||||
if (window.app && window.app.videoModal) {
|
||||
await window.app.videoModal.open(mockVideo);
|
||||
} else {
|
||||
console.error("Could not find window.app.videoModal");
|
||||
// Fallback: Try to find the modal element and manually unhide it
|
||||
// to verify the toggle structure exists, though open() is better.
|
||||
|
||||
// Note: If window.app isn't exposed, we might struggle to invoke .open() directly
|
||||
// without module injection.
|
||||
}
|
||||
}
|
||||
""")
|
||||
|
||||
# Wait for the modal to appear
|
||||
try:
|
||||
page.wait_for_selector("#playerModal", state="visible", timeout=5000)
|
||||
print("Modal opened successfully.")
|
||||
except:
|
||||
print("Modal did not open via app.videoModal. attempting manual check...")
|
||||
|
||||
# specific check for the toggle container
|
||||
# The toggle container has attribute [data-source-toggle-container]
|
||||
toggle_selector = "[data-source-toggle-container]"
|
||||
|
||||
# Expect it to be visible
|
||||
try:
|
||||
page.wait_for_selector(toggle_selector, state="visible", timeout=2000)
|
||||
print("Source toggle container is visible!")
|
||||
except:
|
||||
print("Source toggle container NOT visible or not found.")
|
||||
# If it's not visible, maybe the video didn't load right.
|
||||
# Let's try to inspect the DOM to see if the element exists at all.
|
||||
content = page.content()
|
||||
if "data-source-toggle-container" in content:
|
||||
print("Element exists in DOM but might be hidden.")
|
||||
else:
|
||||
print("Element does NOT exist in DOM.")
|
||||
|
||||
# Take a screenshot of the modal
|
||||
# We can focus on the stats container where the toggle is
|
||||
stats_selector = "[data-video-stats-container]"
|
||||
try:
|
||||
page.wait_for_selector(stats_selector, state="visible")
|
||||
# Screenshot the whole page or just the modal
|
||||
page.screenshot(path="/home/jules/verification/verification.png")
|
||||
print("Screenshot saved.")
|
||||
except Exception as e:
|
||||
print(f"Could not take targeted screenshot: {e}")
|
||||
page.screenshot(path="/home/jules/verification/verification_fallback.png")
|
||||
|
||||
browser.close()
|
||||
|
||||
if __name__ == "__main__":
|
||||
verify_source_toggle()
|
||||
Reference in new issue
Block a user