@atproto/bsky 0.0.242 → 0.0.244
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/dist/api/app/bsky/actor/searchActors.d.ts.map +1 -1
- package/dist/api/app/bsky/actor/searchActors.js +7 -3
- package/dist/api/app/bsky/actor/searchActors.js.map +1 -1
- package/dist/api/app/bsky/actor/searchActorsTypeahead.d.ts.map +1 -1
- package/dist/api/app/bsky/actor/searchActorsTypeahead.js +12 -6
- package/dist/api/app/bsky/actor/searchActorsTypeahead.js.map +1 -1
- package/dist/api/app/bsky/feed/searchPosts.d.ts.map +1 -1
- package/dist/api/app/bsky/feed/searchPosts.js +8 -3
- package/dist/api/app/bsky/feed/searchPosts.js.map +1 -1
- package/dist/api/app/bsky/graph/searchStarterPacks.d.ts.map +1 -1
- package/dist/api/app/bsky/graph/searchStarterPacks.js +7 -3
- package/dist/api/app/bsky/graph/searchStarterPacks.js.map +1 -1
- package/dist/api/app/bsky/notification/putPreferencesV2.js +4 -1
- package/dist/api/app/bsky/notification/putPreferencesV2.js.map +1 -1
- package/dist/api/app/bsky/notification/util.d.ts +1 -0
- package/dist/api/app/bsky/notification/util.d.ts.map +1 -1
- package/dist/api/app/bsky/notification/util.js +7 -7
- package/dist/api/app/bsky/notification/util.js.map +1 -1
- package/dist/api/app/bsky/unspecced/getPopularFeedGenerators.d.ts.map +1 -1
- package/dist/api/app/bsky/unspecced/getPopularFeedGenerators.js +3 -2
- package/dist/api/app/bsky/unspecced/getPopularFeedGenerators.js.map +1 -1
- package/dist/api/blob-dispatcher.d.ts.map +1 -1
- package/dist/api/blob-dispatcher.js +9 -8
- package/dist/api/blob-dispatcher.js.map +1 -1
- package/dist/api/blob-resolver.d.ts +1 -1
- package/dist/api/blob-resolver.d.ts.map +1 -1
- package/dist/api/blob-resolver.js +0 -1
- package/dist/api/blob-resolver.js.map +1 -1
- package/dist/api/util.d.ts +5 -0
- package/dist/api/util.d.ts.map +1 -1
- package/dist/api/util.js +11 -0
- package/dist/api/util.js.map +1 -1
- package/dist/config.d.ts +2 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +5 -0
- package/dist/config.js.map +1 -1
- package/dist/data-plane/bsync/index.d.ts +2 -0
- package/dist/data-plane/bsync/index.d.ts.map +1 -1
- package/dist/data-plane/bsync/index.js +7 -10
- package/dist/data-plane/bsync/index.js.map +1 -1
- package/dist/data-plane/server/background.d.ts +12 -8
- package/dist/data-plane/server/background.d.ts.map +1 -1
- package/dist/data-plane/server/background.js +32 -14
- package/dist/data-plane/server/background.js.map +1 -1
- package/dist/data-plane/server/db/db.d.ts +4 -5
- package/dist/data-plane/server/db/db.d.ts.map +1 -1
- package/dist/data-plane/server/db/db.js +2 -1
- package/dist/data-plane/server/db/db.js.map +1 -1
- package/dist/data-plane/server/db/migrations/20230627T212437895Z-optional-handle.d.ts.map +1 -1
- package/dist/data-plane/server/db/migrations/20230627T212437895Z-optional-handle.js +2 -4
- package/dist/data-plane/server/db/migrations/20230627T212437895Z-optional-handle.js.map +1 -1
- package/dist/data-plane/server/db/migrations/provider.d.ts +2 -1
- package/dist/data-plane/server/db/migrations/provider.d.ts.map +1 -1
- package/dist/data-plane/server/db/migrations/provider.js.map +1 -1
- package/dist/data-plane/server/db/pagination.d.ts +3 -2
- package/dist/data-plane/server/db/pagination.d.ts.map +1 -1
- package/dist/data-plane/server/db/pagination.js +8 -8
- package/dist/data-plane/server/db/pagination.js.map +1 -1
- package/dist/data-plane/server/db/util.d.ts +5 -5
- package/dist/data-plane/server/db/util.d.ts.map +1 -1
- package/dist/data-plane/server/db/util.js.map +1 -1
- package/dist/data-plane/server/index.d.ts +2 -0
- package/dist/data-plane/server/index.d.ts.map +1 -1
- package/dist/data-plane/server/index.js +7 -10
- package/dist/data-plane/server/index.js.map +1 -1
- package/dist/data-plane/server/indexing/index.d.ts +2 -2
- package/dist/data-plane/server/indexing/index.d.ts.map +1 -1
- package/dist/data-plane/server/indexing/index.js.map +1 -1
- package/dist/data-plane/server/indexing/plugins/block.d.ts +9 -4
- package/dist/data-plane/server/indexing/plugins/block.d.ts.map +1 -1
- package/dist/data-plane/server/indexing/plugins/block.js.map +1 -1
- package/dist/data-plane/server/indexing/plugins/chat-declaration.d.ts +1 -1
- package/dist/data-plane/server/indexing/plugins/chat-declaration.d.ts.map +1 -1
- package/dist/data-plane/server/indexing/plugins/chat-declaration.js.map +1 -1
- package/dist/data-plane/server/indexing/plugins/feed-generator.d.ts +13 -4
- package/dist/data-plane/server/indexing/plugins/feed-generator.d.ts.map +1 -1
- package/dist/data-plane/server/indexing/plugins/feed-generator.js.map +1 -1
- package/dist/data-plane/server/indexing/plugins/follow.d.ts +9 -4
- package/dist/data-plane/server/indexing/plugins/follow.d.ts.map +1 -1
- package/dist/data-plane/server/indexing/plugins/follow.js.map +1 -1
- package/dist/data-plane/server/indexing/plugins/germ-declaration.d.ts +1 -1
- package/dist/data-plane/server/indexing/plugins/germ-declaration.d.ts.map +1 -1
- package/dist/data-plane/server/indexing/plugins/germ-declaration.js.map +1 -1
- package/dist/data-plane/server/indexing/plugins/labeler.d.ts +8 -4
- package/dist/data-plane/server/indexing/plugins/labeler.d.ts.map +1 -1
- package/dist/data-plane/server/indexing/plugins/labeler.js.map +1 -1
- package/dist/data-plane/server/indexing/plugins/like.d.ts +12 -4
- package/dist/data-plane/server/indexing/plugins/like.d.ts.map +1 -1
- package/dist/data-plane/server/indexing/plugins/like.js.map +1 -1
- package/dist/data-plane/server/indexing/plugins/list-block.d.ts +9 -4
- package/dist/data-plane/server/indexing/plugins/list-block.d.ts.map +1 -1
- package/dist/data-plane/server/indexing/plugins/list-block.js.map +1 -1
- package/dist/data-plane/server/indexing/plugins/list-item.d.ts +10 -4
- package/dist/data-plane/server/indexing/plugins/list-item.d.ts.map +1 -1
- package/dist/data-plane/server/indexing/plugins/list-item.js.map +1 -1
- package/dist/data-plane/server/indexing/plugins/list.d.ts +13 -4
- package/dist/data-plane/server/indexing/plugins/list.d.ts.map +1 -1
- package/dist/data-plane/server/indexing/plugins/list.js.map +1 -1
- package/dist/data-plane/server/indexing/plugins/notif-declaration.d.ts +1 -1
- package/dist/data-plane/server/indexing/plugins/notif-declaration.d.ts.map +1 -1
- package/dist/data-plane/server/indexing/plugins/notif-declaration.js.map +1 -1
- package/dist/data-plane/server/indexing/plugins/post-gate.d.ts +1 -1
- package/dist/data-plane/server/indexing/plugins/post-gate.d.ts.map +1 -1
- package/dist/data-plane/server/indexing/plugins/post-gate.js.map +1 -1
- package/dist/data-plane/server/indexing/plugins/post.d.ts +1 -1
- package/dist/data-plane/server/indexing/plugins/post.d.ts.map +1 -1
- package/dist/data-plane/server/indexing/plugins/post.js +4 -3
- package/dist/data-plane/server/indexing/plugins/post.js.map +1 -1
- package/dist/data-plane/server/indexing/plugins/profile.d.ts +1 -1
- package/dist/data-plane/server/indexing/plugins/profile.d.ts.map +1 -1
- package/dist/data-plane/server/indexing/plugins/profile.js.map +1 -1
- package/dist/data-plane/server/indexing/plugins/repost.d.ts +12 -4
- package/dist/data-plane/server/indexing/plugins/repost.d.ts.map +1 -1
- package/dist/data-plane/server/indexing/plugins/repost.js.map +1 -1
- package/dist/data-plane/server/indexing/plugins/starter-pack.d.ts +9 -4
- package/dist/data-plane/server/indexing/plugins/starter-pack.d.ts.map +1 -1
- package/dist/data-plane/server/indexing/plugins/starter-pack.js.map +1 -1
- package/dist/data-plane/server/indexing/plugins/status.d.ts +1 -1
- package/dist/data-plane/server/indexing/plugins/status.d.ts.map +1 -1
- package/dist/data-plane/server/indexing/plugins/status.js.map +1 -1
- package/dist/data-plane/server/indexing/plugins/thread-gate.d.ts +1 -1
- package/dist/data-plane/server/indexing/plugins/thread-gate.d.ts.map +1 -1
- package/dist/data-plane/server/indexing/plugins/thread-gate.js.map +1 -1
- package/dist/data-plane/server/indexing/plugins/verification.d.ts +12 -4
- package/dist/data-plane/server/indexing/plugins/verification.d.ts.map +1 -1
- package/dist/data-plane/server/indexing/plugins/verification.js.map +1 -1
- package/dist/data-plane/server/indexing/processor.d.ts +1 -1
- package/dist/data-plane/server/indexing/processor.d.ts.map +1 -1
- package/dist/data-plane/server/indexing/processor.js.map +1 -1
- package/dist/data-plane/server/routes/blocks.js +22 -14
- package/dist/data-plane/server/routes/blocks.js.map +1 -1
- package/dist/data-plane/server/routes/feed-gens.js +2 -2
- package/dist/data-plane/server/routes/feed-gens.js.map +1 -1
- package/dist/data-plane/server/routes/feeds.js +18 -16
- package/dist/data-plane/server/routes/feeds.js.map +1 -1
- package/dist/data-plane/server/routes/labels.js +1 -1
- package/dist/data-plane/server/routes/labels.js.map +1 -1
- package/dist/data-plane/server/routes/mutes.js +2 -2
- package/dist/data-plane/server/routes/mutes.js.map +1 -1
- package/dist/data-plane/server/routes/notifs.d.ts.map +1 -1
- package/dist/data-plane/server/routes/notifs.js +11 -17
- package/dist/data-plane/server/routes/notifs.js.map +1 -1
- package/dist/data-plane/server/routes/relationships.js.map +1 -1
- package/dist/data-plane/server/routes/search.js +2 -2
- package/dist/data-plane/server/routes/search.js.map +1 -1
- package/dist/data-plane/server/routes/suggestions.js +2 -2
- package/dist/data-plane/server/routes/suggestions.js.map +1 -1
- package/dist/data-plane/server/subscription.d.ts +13 -12
- package/dist/data-plane/server/subscription.d.ts.map +1 -1
- package/dist/data-plane/server/subscription.js +59 -26
- package/dist/data-plane/server/subscription.js.map +1 -1
- package/dist/data-plane/server/util.d.ts +31 -23
- package/dist/data-plane/server/util.d.ts.map +1 -1
- package/dist/feature-gates/index.d.ts +2 -1
- package/dist/feature-gates/index.d.ts.map +1 -1
- package/dist/feature-gates/index.js +9 -6
- package/dist/feature-gates/index.js.map +1 -1
- package/dist/feature-gates/metrics.d.ts +3 -3
- package/dist/feature-gates/metrics.d.ts.map +1 -1
- package/dist/feature-gates/metrics.js +8 -8
- package/dist/feature-gates/metrics.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -7
- package/dist/index.js.map +1 -1
- package/dist/lexicons/app/bsky/notification/defs.defs.d.ts +5 -0
- package/dist/lexicons/app/bsky/notification/defs.defs.d.ts.map +1 -1
- package/dist/lexicons/app/bsky/notification/defs.defs.js +1 -0
- package/dist/lexicons/app/bsky/notification/defs.defs.js.map +1 -1
- package/dist/lexicons/chat/bsky/notification/defs.d.ts +2 -0
- package/dist/lexicons/chat/bsky/notification/defs.d.ts.map +1 -0
- package/dist/lexicons/chat/bsky/notification/defs.defs.d.ts +20 -0
- package/dist/lexicons/chat/bsky/notification/defs.defs.d.ts.map +1 -0
- package/dist/lexicons/chat/bsky/notification/defs.defs.js +19 -0
- package/dist/lexicons/chat/bsky/notification/defs.defs.js.map +1 -0
- package/dist/lexicons/chat/bsky/notification/defs.js +5 -0
- package/dist/lexicons/chat/bsky/notification/defs.js.map +1 -0
- package/dist/lexicons/chat/bsky/notification/getPreferences.d.ts +3 -0
- package/dist/lexicons/chat/bsky/notification/getPreferences.d.ts.map +1 -0
- package/dist/lexicons/chat/bsky/notification/getPreferences.defs.d.ts +18 -0
- package/dist/lexicons/chat/bsky/notification/getPreferences.defs.d.ts.map +1 -0
- package/dist/lexicons/chat/bsky/notification/getPreferences.defs.js +16 -0
- package/dist/lexicons/chat/bsky/notification/getPreferences.defs.js.map +1 -0
- package/dist/lexicons/chat/bsky/notification/getPreferences.js +6 -0
- package/dist/lexicons/chat/bsky/notification/getPreferences.js.map +1 -0
- package/dist/lexicons/chat/bsky/notification/putPreferences.d.ts +3 -0
- package/dist/lexicons/chat/bsky/notification/putPreferences.d.ts.map +1 -0
- package/dist/lexicons/chat/bsky/notification/putPreferences.defs.d.ts +27 -0
- package/dist/lexicons/chat/bsky/notification/putPreferences.defs.d.ts.map +1 -0
- package/dist/lexicons/chat/bsky/notification/putPreferences.defs.js +22 -0
- package/dist/lexicons/chat/bsky/notification/putPreferences.defs.js.map +1 -0
- package/dist/lexicons/chat/bsky/notification/putPreferences.js +6 -0
- package/dist/lexicons/chat/bsky/notification/putPreferences.js.map +1 -0
- package/dist/lexicons/chat/bsky/notification.d.ts +4 -0
- package/dist/lexicons/chat/bsky/notification.d.ts.map +1 -0
- package/dist/lexicons/chat/bsky/notification.js +7 -0
- package/dist/lexicons/chat/bsky/notification.js.map +1 -0
- package/dist/lexicons/chat/bsky.d.ts +1 -0
- package/dist/lexicons/chat/bsky.d.ts.map +1 -1
- package/dist/lexicons/chat/bsky.js +1 -0
- package/dist/lexicons/chat/bsky.js.map +1 -1
- package/dist/lexicons/tools/ozone/report/defs.defs.d.ts +4 -0
- package/dist/lexicons/tools/ozone/report/defs.defs.d.ts.map +1 -1
- package/dist/lexicons/tools/ozone/report/defs.defs.js +2 -0
- package/dist/lexicons/tools/ozone/report/defs.defs.js.map +1 -1
- package/dist/lexicons/tools/ozone/report/queryActivities.d.ts +3 -0
- package/dist/lexicons/tools/ozone/report/queryActivities.d.ts.map +1 -0
- package/dist/lexicons/tools/ozone/report/queryActivities.defs.d.ts +42 -0
- package/dist/lexicons/tools/ozone/report/queryActivities.defs.d.ts.map +1 -0
- package/dist/lexicons/tools/ozone/report/queryActivities.defs.js +31 -0
- package/dist/lexicons/tools/ozone/report/queryActivities.defs.js.map +1 -0
- package/dist/lexicons/tools/ozone/report/queryActivities.js +6 -0
- package/dist/lexicons/tools/ozone/report/queryActivities.js.map +1 -0
- package/dist/lexicons/tools/ozone/report.d.ts +1 -0
- package/dist/lexicons/tools/ozone/report.d.ts.map +1 -1
- package/dist/lexicons/tools/ozone/report.js +1 -0
- package/dist/lexicons/tools/ozone/report.js.map +1 -1
- package/dist/proto/bsky_pb.d.ts +47 -53
- package/dist/proto/bsky_pb.d.ts.map +1 -1
- package/dist/proto/bsky_pb.js +62 -71
- package/dist/proto/bsky_pb.js.map +1 -1
- package/package.json +13 -13
- package/proto/bsky.proto +19 -17
- package/src/api/app/bsky/actor/searchActors.ts +17 -6
- package/src/api/app/bsky/actor/searchActorsTypeahead.ts +16 -8
- package/src/api/app/bsky/feed/searchPosts.ts +12 -5
- package/src/api/app/bsky/graph/searchStarterPacks.ts +14 -5
- package/src/api/app/bsky/notification/putPreferencesV2.ts +4 -1
- package/src/api/app/bsky/notification/util.ts +7 -11
- package/src/api/app/bsky/unspecced/getPopularFeedGenerators.ts +9 -2
- package/src/api/blob-dispatcher.ts +12 -8
- package/src/api/blob-resolver.ts +0 -1
- package/src/api/util.ts +17 -0
- package/src/config.ts +9 -0
- package/src/data-plane/bsync/index.ts +12 -10
- package/src/data-plane/server/background.ts +49 -18
- package/src/data-plane/server/db/db.ts +1 -1
- package/src/data-plane/server/db/migrations/20230627T212437895Z-optional-handle.ts +2 -4
- package/src/data-plane/server/db/migrations/provider.ts +2 -1
- package/src/data-plane/server/db/pagination.ts +15 -15
- package/src/data-plane/server/db/util.ts +8 -5
- package/src/data-plane/server/index.ts +12 -10
- package/src/data-plane/server/indexing/index.ts +1 -1
- package/src/data-plane/server/indexing/plugins/block.ts +4 -1
- package/src/data-plane/server/indexing/plugins/chat-declaration.ts +4 -1
- package/src/data-plane/server/indexing/plugins/feed-generator.ts +4 -1
- package/src/data-plane/server/indexing/plugins/follow.ts +4 -1
- package/src/data-plane/server/indexing/plugins/germ-declaration.ts +4 -1
- package/src/data-plane/server/indexing/plugins/labeler.ts +4 -1
- package/src/data-plane/server/indexing/plugins/like.ts +4 -1
- package/src/data-plane/server/indexing/plugins/list-block.ts +4 -1
- package/src/data-plane/server/indexing/plugins/list-item.ts +4 -1
- package/src/data-plane/server/indexing/plugins/list.ts +4 -1
- package/src/data-plane/server/indexing/plugins/notif-declaration.ts +4 -1
- package/src/data-plane/server/indexing/plugins/post-gate.ts +4 -1
- package/src/data-plane/server/indexing/plugins/post.ts +9 -5
- package/src/data-plane/server/indexing/plugins/profile.ts +4 -1
- package/src/data-plane/server/indexing/plugins/repost.ts +4 -1
- package/src/data-plane/server/indexing/plugins/starter-pack.ts +4 -1
- package/src/data-plane/server/indexing/plugins/status.ts +4 -1
- package/src/data-plane/server/indexing/plugins/thread-gate.ts +4 -1
- package/src/data-plane/server/indexing/plugins/verification.ts +4 -1
- package/src/data-plane/server/indexing/processor.ts +1 -1
- package/src/data-plane/server/routes/blocks.ts +30 -24
- package/src/data-plane/server/routes/feed-gens.ts +2 -2
- package/src/data-plane/server/routes/feeds.ts +23 -19
- package/src/data-plane/server/routes/labels.ts +2 -2
- package/src/data-plane/server/routes/mutes.ts +8 -6
- package/src/data-plane/server/routes/notifs.ts +15 -26
- package/src/data-plane/server/routes/relationships.ts +4 -2
- package/src/data-plane/server/routes/search.ts +2 -2
- package/src/data-plane/server/routes/suggestions.ts +2 -2
- package/src/data-plane/server/subscription.ts +74 -31
- package/src/feature-gates/index.ts +10 -6
- package/src/feature-gates/metrics.test.ts +12 -12
- package/src/feature-gates/metrics.ts +8 -8
- package/src/index.ts +16 -9
- package/tests/_util.ts +8 -25
- package/tests/admin/admin-auth.test.ts +2 -2
- package/tests/admin/moderation.test.ts +1 -1
- package/tests/auth.test.ts +4 -6
- package/tests/blob-resolver.test.ts +4 -5
- package/tests/data-plane/db.test.ts +1 -1
- package/tests/data-plane/duplicate-records.test.ts +1 -1
- package/tests/data-plane/handle-invalidation.test.ts +2 -2
- package/tests/data-plane/indexing.test.ts +24 -21
- package/tests/data-plane/subscription.test.ts +3 -3
- package/tests/data-plane/thread-mutes.test.ts +2 -2
- package/tests/entryway-auth.test.ts +4 -5
- package/tests/feed-generation.test.ts +5 -5
- package/tests/image/server.test.ts +1 -1
- package/tests/label-hydration.test.ts +3 -5
- package/tests/postgates.test.ts +3 -6
- package/tests/query-labels.test.ts +3 -5
- package/tests/redis-cache.test.ts +1 -3
- package/tests/server.test.ts +11 -16
- package/tests/sitemap.test.ts +3 -4
- package/tests/stash.test.ts +12 -8
- package/tests/utils.test.ts +3 -13
- package/tests/views/account-deactivation.test.ts +3 -5
- package/tests/views/actor-likes.test.ts +3 -5
- package/tests/views/actor-search.test.ts +6 -7
- package/tests/views/age-assurance-v2.test.ts +9 -6
- package/tests/views/age-assurance.test.ts +30 -36
- package/tests/views/author-feed.test.ts +4 -6
- package/tests/views/block-lists.test.ts +3 -5
- package/tests/views/blocks.test.ts +3 -5
- package/tests/views/bookmarks.test.ts +4 -4
- package/tests/views/drafts.test.ts +7 -14
- package/tests/views/feed-hidden-replies.test.ts +3 -6
- package/tests/views/feed-view-post.test.ts +3 -6
- package/tests/views/follows.test.ts +4 -6
- package/tests/views/get-config.test.ts +4 -7
- package/tests/views/get-suggested-onboarding-users.test.ts +11 -9
- package/tests/views/get-suggested-starter-packs.test.ts +11 -9
- package/tests/views/get-trends.test.ts +15 -9
- package/tests/views/internal-actor.test.ts +3 -6
- package/tests/views/known-followers.test.ts +3 -6
- package/tests/views/labeler-service.test.ts +3 -5
- package/tests/views/labels-needs-review.test.ts +3 -6
- package/tests/views/labels-takedown.test.ts +3 -4
- package/tests/views/likes.test.ts +4 -6
- package/tests/views/list-feed.test.ts +3 -5
- package/tests/views/lists.test.ts +3 -5
- package/tests/views/mute-lists.test.ts +3 -5
- package/tests/views/mutes.test.ts +4 -5
- package/tests/views/notifications.test.ts +12 -11
- package/tests/views/post-search.test.ts +3 -24
- package/tests/views/posts-debug.test.ts +11 -6
- package/tests/views/posts.test.ts +3 -4
- package/tests/views/profile-debug.test.ts +11 -5
- package/tests/views/profile.test.ts +11 -5
- package/tests/views/quotes.test.ts +4 -6
- package/tests/views/reposts.test.ts +4 -6
- package/tests/views/starter-packs.test.ts +3 -6
- package/tests/views/suggestions.test.ts +9 -13
- package/tests/views/thread-v2.test.ts +3 -5
- package/tests/views/thread.test.ts +3 -7
- package/tests/views/threadgating.test.ts +3 -5
- package/tests/views/timeline.test.ts +4 -5
- package/tests/views/verification.test.ts +4 -6
- package/tsconfig.build.tsbuildinfo +1 -1
- package/vitest.config.ts +1 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { afterAll, beforeAll, describe, expect, it } from 'vitest'
|
|
1
|
+
import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
|
|
2
2
|
import { AppBskyFeedGetLikes, AtpAgent, ids } from '@atproto/api'
|
|
3
3
|
import { SeedClient, TestNetwork, likesSeed } from '@atproto/dev-env'
|
|
4
4
|
import {
|
|
@@ -31,18 +31,16 @@ describe('pds like views', () => {
|
|
|
31
31
|
email: 'frankie@frankie.com',
|
|
32
32
|
password: 'password',
|
|
33
33
|
})
|
|
34
|
-
await network.processAll()
|
|
35
34
|
|
|
36
35
|
alice = sc.dids.alice
|
|
37
36
|
bob = sc.dids.bob
|
|
38
37
|
carol = sc.dids.carol
|
|
39
38
|
frankie = sc.dids.frankie
|
|
40
|
-
}, 20_000) // @NOTE seeding can take a while
|
|
41
|
-
|
|
42
|
-
afterAll(async () => {
|
|
43
|
-
await network.close()
|
|
44
39
|
})
|
|
45
40
|
|
|
41
|
+
beforeEach(async () => network.processAll())
|
|
42
|
+
afterAll(async () => network?.close())
|
|
43
|
+
|
|
46
44
|
const getCursors = (items: { createdAt?: string }[]) =>
|
|
47
45
|
items.map((item) => item.createdAt ?? constantDate)
|
|
48
46
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { afterAll, beforeAll, describe, expect, it } from 'vitest'
|
|
1
|
+
import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
|
|
2
2
|
import { AppBskyFeedGetListFeed, AtpAgent, ids } from '@atproto/api'
|
|
3
3
|
import { RecordRef, SeedClient, TestNetwork, basicSeed } from '@atproto/dev-env'
|
|
4
4
|
import {
|
|
@@ -33,12 +33,10 @@ describe('list feed views', () => {
|
|
|
33
33
|
listRef = await sc.createList(alice, 'test list', 'curate')
|
|
34
34
|
await sc.addToList(alice, alice, listRef)
|
|
35
35
|
await sc.addToList(alice, bob, listRef)
|
|
36
|
-
await network.processAll()
|
|
37
36
|
})
|
|
38
37
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
})
|
|
38
|
+
beforeEach(async () => network.processAll())
|
|
39
|
+
afterAll(async () => network?.close())
|
|
42
40
|
|
|
43
41
|
it('fetches list feed', async () => {
|
|
44
42
|
const res = await agent.api.app.bsky.feed.getListFeed(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { afterAll, beforeAll, describe, expect, it } from 'vitest'
|
|
1
|
+
import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
|
|
2
2
|
import {
|
|
3
3
|
AppBskyGraphGetLists,
|
|
4
4
|
AppBskyGraphGetListsWithMembership,
|
|
@@ -86,7 +86,6 @@ describe('bsky actor likes feed views', () => {
|
|
|
86
86
|
await sc.block(sc.dids.frankie, sc.dids.greta)
|
|
87
87
|
await sc.block(sc.dids.frankie, sc.dids.eve)
|
|
88
88
|
|
|
89
|
-
await network.processAll()
|
|
90
89
|
blockList = newBlockList.uriStr
|
|
91
90
|
curateList = newCurList.uriStr
|
|
92
91
|
referenceList = newRefList.uriStr
|
|
@@ -102,9 +101,8 @@ describe('bsky actor likes feed views', () => {
|
|
|
102
101
|
greta = sc.dids.greta
|
|
103
102
|
})
|
|
104
103
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
})
|
|
104
|
+
beforeEach(async () => network.processAll())
|
|
105
|
+
afterAll(async () => network?.close())
|
|
108
106
|
|
|
109
107
|
it('does not include reference lists in getActorLists', async () => {
|
|
110
108
|
const view = await agent.app.bsky.graph.getLists({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { afterAll, beforeAll, describe, expect, it } from 'vitest'
|
|
1
|
+
import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
|
|
2
2
|
import { AtUri, AtpAgent, ids } from '@atproto/api'
|
|
3
3
|
import { RecordRef, SeedClient, TestNetwork, basicSeed } from '@atproto/dev-env'
|
|
4
4
|
import { forSnapshot } from '../_util.js'
|
|
@@ -29,12 +29,10 @@ describe('bsky views with mutes from mute lists', () => {
|
|
|
29
29
|
// add follows to ensure mutes work even w follows
|
|
30
30
|
await sc.follow(carol, dan)
|
|
31
31
|
await sc.follow(dan, carol)
|
|
32
|
-
await network.processAll()
|
|
33
32
|
})
|
|
34
33
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
})
|
|
34
|
+
beforeEach(async () => network.processAll())
|
|
35
|
+
afterAll(async () => network?.close())
|
|
38
36
|
|
|
39
37
|
let listUri: string
|
|
40
38
|
let listCid: string
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { afterAll, beforeAll, describe, expect, it } from 'vitest'
|
|
1
|
+
import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
|
|
2
2
|
import { AppBskyGraphGetMutes, AtpAgent, ids } from '@atproto/api'
|
|
3
3
|
import {
|
|
4
4
|
SeedClient,
|
|
@@ -54,12 +54,11 @@ describe('mute views', () => {
|
|
|
54
54
|
},
|
|
55
55
|
)
|
|
56
56
|
}
|
|
57
|
-
}, 20_000) // @NOTE seeding can take a while
|
|
58
|
-
|
|
59
|
-
afterAll(async () => {
|
|
60
|
-
await network.close()
|
|
61
57
|
})
|
|
62
58
|
|
|
59
|
+
beforeEach(async () => network.processAll())
|
|
60
|
+
afterAll(async () => network?.close())
|
|
61
|
+
|
|
63
62
|
it('flags mutes in threads', async () => {
|
|
64
63
|
const res = await agent.api.app.bsky.feed.getPostThread(
|
|
65
64
|
{ depth: 1, uri: sc.posts[alice][1].ref.uriStr },
|
|
@@ -91,8 +91,6 @@ describe('notification views', () => {
|
|
|
91
91
|
password: 'blocked-pass',
|
|
92
92
|
})
|
|
93
93
|
|
|
94
|
-
await network.processAll()
|
|
95
|
-
|
|
96
94
|
alice = sc.dids.alice
|
|
97
95
|
bob = sc.dids.bob
|
|
98
96
|
carol = sc.dids.carol
|
|
@@ -104,9 +102,8 @@ describe('notification views', () => {
|
|
|
104
102
|
blocked = sc.dids.blocked
|
|
105
103
|
})
|
|
106
104
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
})
|
|
105
|
+
beforeEach(async () => network.processAll())
|
|
106
|
+
afterAll(async () => network?.close())
|
|
110
107
|
|
|
111
108
|
const sortNotifs = (
|
|
112
109
|
notifs: AppBskyNotificationListNotifications.Notification[],
|
|
@@ -728,12 +725,12 @@ describe('notification views', () => {
|
|
|
728
725
|
await network.processAll()
|
|
729
726
|
})
|
|
730
727
|
|
|
731
|
-
// @NOTE there is some flakyness between these tests. We sometimes get
|
|
732
|
-
// "priority": true when the snapshot expects false.
|
|
733
|
-
|
|
734
728
|
it('filters notifications by reason', async () => {
|
|
735
729
|
const res = await agent.app.bsky.notification.listNotifications(
|
|
736
730
|
{
|
|
731
|
+
// Pin priority so the snapshot doesn't race with the viewer's stored
|
|
732
|
+
// priority preference, which neighbouring tests mutate.
|
|
733
|
+
priority: false,
|
|
737
734
|
reasons: ['mention'],
|
|
738
735
|
},
|
|
739
736
|
{
|
|
@@ -750,6 +747,9 @@ describe('notification views', () => {
|
|
|
750
747
|
it('filters notifications by multiple reasons', async () => {
|
|
751
748
|
const res = await agent.app.bsky.notification.listNotifications(
|
|
752
749
|
{
|
|
750
|
+
// Pin priority so the snapshot doesn't race with the viewer's stored
|
|
751
|
+
// priority preference, which neighbouring tests mutate.
|
|
752
|
+
priority: false,
|
|
753
753
|
reasons: ['mention', 'reply'],
|
|
754
754
|
},
|
|
755
755
|
{
|
|
@@ -1203,7 +1203,8 @@ describe('notification views', () => {
|
|
|
1203
1203
|
},
|
|
1204
1204
|
}
|
|
1205
1205
|
const expected0: AppBskyNotificationDefs.Preferences = {
|
|
1206
|
-
chat:
|
|
1206
|
+
// chat is deprecated: input is ignored and the default is always returned.
|
|
1207
|
+
chat: cp,
|
|
1207
1208
|
follow: fp,
|
|
1208
1209
|
like: fp,
|
|
1209
1210
|
likeViaRepost: fp,
|
|
@@ -1227,8 +1228,8 @@ describe('notification views', () => {
|
|
|
1227
1228
|
},
|
|
1228
1229
|
}
|
|
1229
1230
|
const expected1: AppBskyNotificationDefs.Preferences = {
|
|
1230
|
-
//
|
|
1231
|
-
chat:
|
|
1231
|
+
// chat is deprecated: input is ignored and the default is always returned.
|
|
1232
|
+
chat: cp,
|
|
1232
1233
|
follow: fp,
|
|
1233
1234
|
like: fp,
|
|
1234
1235
|
likeViaRepost: fp,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { afterAll, beforeAll, describe, expect, it } from 'vitest'
|
|
1
|
+
import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
|
|
2
2
|
import { AppBskyFeedSearchPosts, AtpAgent, ids } from '@atproto/api'
|
|
3
3
|
import { SeedClient, TestNetwork, basicSeed } from '@atproto/dev-env'
|
|
4
4
|
import { DatabaseSchema } from '../../src/index.js'
|
|
@@ -51,13 +51,8 @@ describe('appview search', () => {
|
|
|
51
51
|
nonTaggedResults = [post2.ref.uriStr, post0.ref.uriStr]
|
|
52
52
|
})
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
uri: post1.ref.uriStr,
|
|
57
|
-
})
|
|
58
|
-
|
|
59
|
-
await network.close()
|
|
60
|
-
})
|
|
54
|
+
beforeEach(async () => network.processAll())
|
|
55
|
+
afterAll(async () => network?.close())
|
|
61
56
|
|
|
62
57
|
describe(`post search with 'top' sort`, () => {
|
|
63
58
|
type TestCase = {
|
|
@@ -202,19 +197,3 @@ const createTag = async (
|
|
|
202
197
|
.returningAll()
|
|
203
198
|
.execute()
|
|
204
199
|
}
|
|
205
|
-
|
|
206
|
-
const deleteTags = async (
|
|
207
|
-
db: DatabaseSchema,
|
|
208
|
-
opts: {
|
|
209
|
-
uri: string
|
|
210
|
-
},
|
|
211
|
-
) => {
|
|
212
|
-
await db
|
|
213
|
-
.updateTable('record')
|
|
214
|
-
.set({
|
|
215
|
-
tags: JSON.stringify([]),
|
|
216
|
-
})
|
|
217
|
-
.where('uri', '=', opts.uri)
|
|
218
|
-
.returningAll()
|
|
219
|
-
.execute()
|
|
220
|
-
}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
afterAll,
|
|
3
|
+
afterEach,
|
|
4
|
+
beforeAll,
|
|
5
|
+
beforeEach,
|
|
6
|
+
describe,
|
|
7
|
+
expect,
|
|
8
|
+
it,
|
|
9
|
+
} from 'vitest'
|
|
2
10
|
import { AtpAgent, ids } from '@atproto/api'
|
|
3
11
|
import { SeedClient, TestNetwork, basicSeed } from '@atproto/dev-env'
|
|
4
12
|
|
|
@@ -14,16 +22,13 @@ describe('post views w/ debug field', () => {
|
|
|
14
22
|
agent = network.bsky.getAgent()
|
|
15
23
|
sc = network.getSeedClient()
|
|
16
24
|
await basicSeed(sc)
|
|
17
|
-
await network.processAll()
|
|
18
25
|
})
|
|
19
26
|
|
|
27
|
+
beforeEach(async () => network.processAll())
|
|
20
28
|
afterEach(() => {
|
|
21
29
|
network.bsky.ctx.cfg.debugFieldAllowedDids.clear()
|
|
22
30
|
})
|
|
23
|
-
|
|
24
|
-
afterAll(async () => {
|
|
25
|
-
await network.close()
|
|
26
|
-
})
|
|
31
|
+
afterAll(async () => network?.close())
|
|
27
32
|
|
|
28
33
|
it(`does not include debug field for unauthed requests`, async () => {
|
|
29
34
|
network.bsky.ctx.cfg.debugFieldAllowedDids.add(sc.dids.bob)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { afterAll, beforeAll, describe, expect, it } from 'vitest'
|
|
1
|
+
import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
|
|
2
2
|
import {
|
|
3
3
|
AppBskyEmbedGallery,
|
|
4
4
|
AppBskyEmbedRecord,
|
|
@@ -52,9 +52,8 @@ describe('pds posts views', () => {
|
|
|
52
52
|
})
|
|
53
53
|
})
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
})
|
|
55
|
+
beforeEach(async () => network.processAll())
|
|
56
|
+
afterAll(async () => network?.close())
|
|
58
57
|
|
|
59
58
|
it('fetches posts', async () => {
|
|
60
59
|
const uris = [
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
afterAll,
|
|
3
|
+
afterEach,
|
|
4
|
+
beforeAll,
|
|
5
|
+
beforeEach,
|
|
6
|
+
describe,
|
|
7
|
+
expect,
|
|
8
|
+
it,
|
|
9
|
+
} from 'vitest'
|
|
2
10
|
import { AtpAgent, ids } from '@atproto/api'
|
|
3
11
|
import { SeedClient, TestNetwork, basicSeed } from '@atproto/dev-env'
|
|
4
12
|
|
|
@@ -16,13 +24,11 @@ describe('profile views w/ debug field', () => {
|
|
|
16
24
|
await basicSeed(sc)
|
|
17
25
|
})
|
|
18
26
|
|
|
27
|
+
beforeEach(async () => network.processAll())
|
|
19
28
|
afterEach(() => {
|
|
20
29
|
network.bsky.ctx.cfg.debugFieldAllowedDids.clear()
|
|
21
30
|
})
|
|
22
|
-
|
|
23
|
-
afterAll(async () => {
|
|
24
|
-
await network.close()
|
|
25
|
-
})
|
|
31
|
+
afterAll(async () => network?.close())
|
|
26
32
|
|
|
27
33
|
it(`does not include debug field for unauthed requests`, async () => {
|
|
28
34
|
network.bsky.ctx.cfg.debugFieldAllowedDids.add(sc.dids.bob)
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import assert from 'node:assert'
|
|
2
2
|
import fs from 'node:fs/promises'
|
|
3
3
|
import { Timestamp } from '@bufbuild/protobuf'
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
afterAll,
|
|
6
|
+
beforeAll,
|
|
7
|
+
beforeEach,
|
|
8
|
+
describe,
|
|
9
|
+
expect,
|
|
10
|
+
it,
|
|
11
|
+
vi,
|
|
12
|
+
} from 'vitest'
|
|
5
13
|
import {
|
|
6
14
|
AppBskyEmbedExternal,
|
|
7
15
|
AtpAgent,
|
|
@@ -77,7 +85,6 @@ describe('pds profile views', () => {
|
|
|
77
85
|
password: 'noprofile-pass',
|
|
78
86
|
})
|
|
79
87
|
|
|
80
|
-
await network.processAll()
|
|
81
88
|
alice = sc.dids.alice
|
|
82
89
|
bob = sc.dids.bob
|
|
83
90
|
dan = sc.dids.dan
|
|
@@ -86,9 +93,8 @@ describe('pds profile views', () => {
|
|
|
86
93
|
noprofile = sc.dids.noprofile
|
|
87
94
|
})
|
|
88
95
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
})
|
|
96
|
+
beforeEach(async () => network.processAll())
|
|
97
|
+
afterAll(async () => network?.close())
|
|
92
98
|
|
|
93
99
|
// @TODO(bsky) blocked by actor takedown via labels.
|
|
94
100
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { afterAll, beforeAll, describe, expect, it } from 'vitest'
|
|
1
|
+
import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
|
|
2
2
|
import { AtpAgent, ids } from '@atproto/api'
|
|
3
3
|
import { SeedClient, TestNetwork, quotesSeed } from '@atproto/dev-env'
|
|
4
4
|
import { forSnapshot } from '../_util.js'
|
|
@@ -21,17 +21,15 @@ describe('pds quote views', () => {
|
|
|
21
21
|
agent = network.bsky.getAgent()
|
|
22
22
|
sc = network.getSeedClient()
|
|
23
23
|
await quotesSeed(sc)
|
|
24
|
-
await network.processAll()
|
|
25
24
|
alice = sc.dids.alice
|
|
26
25
|
bob = sc.dids.bob
|
|
27
26
|
carol = sc.dids.carol
|
|
28
27
|
eve = sc.dids.eve
|
|
29
|
-
}, 20_000) // @NOTE seeding can take a while
|
|
30
|
-
|
|
31
|
-
afterAll(async () => {
|
|
32
|
-
await network.close()
|
|
33
28
|
})
|
|
34
29
|
|
|
30
|
+
beforeEach(async () => network.processAll())
|
|
31
|
+
afterAll(async () => network?.close())
|
|
32
|
+
|
|
35
33
|
it('fetches post quotes', async () => {
|
|
36
34
|
const alicePostQuotes = await agent.api.app.bsky.feed.getQuotes(
|
|
37
35
|
{ uri: sc.posts[alice][0].ref.uriStr, limit: 30 },
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { afterAll, beforeAll, describe, expect, it } from 'vitest'
|
|
1
|
+
import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
|
|
2
2
|
import { AppBskyFeedGetRepostedBy, AtpAgent, ids } from '@atproto/api'
|
|
3
3
|
import { SeedClient, TestNetwork, repostsSeed } from '@atproto/dev-env'
|
|
4
4
|
import { forSnapshot, paginateAll, stripViewer } from '../_util.js'
|
|
@@ -19,15 +19,13 @@ describe('pds repost views', () => {
|
|
|
19
19
|
agent = network.bsky.getAgent()
|
|
20
20
|
sc = network.getSeedClient()
|
|
21
21
|
await repostsSeed(sc)
|
|
22
|
-
await network.processAll()
|
|
23
22
|
alice = sc.dids.alice
|
|
24
23
|
bob = sc.dids.bob
|
|
25
|
-
}, 20_000) // @NOTE seeding can take a while
|
|
26
|
-
|
|
27
|
-
afterAll(async () => {
|
|
28
|
-
await network.close()
|
|
29
24
|
})
|
|
30
25
|
|
|
26
|
+
beforeEach(async () => network.processAll())
|
|
27
|
+
afterAll(async () => network?.close())
|
|
28
|
+
|
|
31
29
|
it('fetches reposted-by for a post', async () => {
|
|
32
30
|
const view = await agent.api.app.bsky.feed.getRepostedBy(
|
|
33
31
|
{ uri: sc.posts[alice][2].ref.uriStr },
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import assert from 'node:assert'
|
|
2
|
-
import { afterAll, beforeAll, describe, expect, it } from 'vitest'
|
|
2
|
+
import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
|
|
3
3
|
import {
|
|
4
4
|
AppBskyActorProfile,
|
|
5
5
|
AppBskyGraphGetStarterPacksWithMembership,
|
|
@@ -80,13 +80,10 @@ describe('starter packs', () => {
|
|
|
80
80
|
[sc.dids.alice, sc.dids.frankie],
|
|
81
81
|
[],
|
|
82
82
|
)
|
|
83
|
-
|
|
84
|
-
await network.processAll()
|
|
85
83
|
})
|
|
86
84
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
})
|
|
85
|
+
beforeEach(async () => network.processAll())
|
|
86
|
+
afterAll(async () => network?.close())
|
|
90
87
|
|
|
91
88
|
it('gets actor starter packs.', async () => {
|
|
92
89
|
const { data } = await agent.api.app.bsky.graph.getActorStarterPacks({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { afterAll, beforeAll, describe, expect, it } from 'vitest'
|
|
1
|
+
import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
|
|
2
2
|
import { AtpAgent, ids } from '@atproto/api'
|
|
3
3
|
import { SeedClient, TestNetwork, basicSeed } from '@atproto/dev-env'
|
|
4
4
|
import { stripViewer } from '../_util.js'
|
|
@@ -15,24 +15,20 @@ describe('pds user search views', () => {
|
|
|
15
15
|
agent = network.bsky.getAgent()
|
|
16
16
|
sc = network.getSeedClient()
|
|
17
17
|
await basicSeed(sc)
|
|
18
|
-
await network.processAll()
|
|
19
|
-
|
|
20
|
-
const suggestions = [
|
|
21
|
-
{ did: sc.dids.alice, order: 1 },
|
|
22
|
-
{ did: sc.dids.bob, order: 2 },
|
|
23
|
-
{ did: sc.dids.carol, order: 3 },
|
|
24
|
-
{ did: sc.dids.dan, order: 4 },
|
|
25
|
-
]
|
|
26
18
|
|
|
27
19
|
await network.bsky.db.db
|
|
28
20
|
.insertInto('suggested_follow')
|
|
29
|
-
.values(
|
|
21
|
+
.values([
|
|
22
|
+
{ did: sc.dids.alice, order: 1 },
|
|
23
|
+
{ did: sc.dids.bob, order: 2 },
|
|
24
|
+
{ did: sc.dids.carol, order: 3 },
|
|
25
|
+
{ did: sc.dids.dan, order: 4 },
|
|
26
|
+
])
|
|
30
27
|
.execute()
|
|
31
28
|
})
|
|
32
29
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
})
|
|
30
|
+
beforeEach(async () => network.processAll())
|
|
31
|
+
afterAll(async () => network?.close())
|
|
36
32
|
|
|
37
33
|
it('actor suggestion gives users', async () => {
|
|
38
34
|
const result = await agent.api.app.bsky.actor.getSuggestions(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import assert from 'node:assert'
|
|
2
|
-
import { afterAll, beforeAll, describe, expect, it } from 'vitest'
|
|
2
|
+
import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
|
|
3
3
|
import {
|
|
4
4
|
AppBskyUnspeccedDefs,
|
|
5
5
|
AppBskyUnspeccedGetPostThreadOtherV2,
|
|
@@ -54,12 +54,10 @@ describe('appview thread views v2', () => {
|
|
|
54
54
|
agent = network.bsky.getAgent()
|
|
55
55
|
sc = network.getSeedClient()
|
|
56
56
|
labelerDid = network.bsky.ctx.cfg.modServiceDid
|
|
57
|
-
await network.processAll()
|
|
58
57
|
})
|
|
59
58
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
})
|
|
59
|
+
beforeEach(async () => network.processAll())
|
|
60
|
+
afterAll(async () => network?.close())
|
|
63
61
|
|
|
64
62
|
describe('not found anchor', () => {
|
|
65
63
|
it('returns not found error', async () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import assert from 'node:assert'
|
|
2
|
-
import { afterAll, beforeAll, describe, expect, it } from 'vitest'
|
|
2
|
+
import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
|
|
3
3
|
import {
|
|
4
4
|
AppBskyFeedDefs,
|
|
5
5
|
AppBskyFeedGetPostThread,
|
|
@@ -40,17 +40,13 @@ describe('appview thread views', () => {
|
|
|
40
40
|
await sc.like(alice, sc.replies[alice][0].ref)
|
|
41
41
|
await sc.like(alice, sc.replies[bob][0].ref)
|
|
42
42
|
await sc.like(alice, sc.replies[carol][0].ref)
|
|
43
|
-
})
|
|
44
43
|
|
|
45
|
-
beforeAll(async () => {
|
|
46
44
|
// Add a repost of a reply so that we can confirm myState in the thread
|
|
47
45
|
await sc.repost(bob, sc.replies[alice][0].ref)
|
|
48
|
-
await network.processAll()
|
|
49
46
|
})
|
|
50
47
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
})
|
|
48
|
+
beforeEach(async () => network.processAll())
|
|
49
|
+
afterAll(async () => network?.close())
|
|
54
50
|
|
|
55
51
|
it('fetches deep post thread', async () => {
|
|
56
52
|
const thread = await agent.api.app.bsky.feed.getPostThread(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import assert from 'node:assert'
|
|
2
|
-
import { afterAll, beforeAll, describe, expect, it } from 'vitest'
|
|
2
|
+
import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
|
|
3
3
|
import { AppBskyFeedDefs, AtpAgent, ids } from '@atproto/api'
|
|
4
4
|
import { SeedClient, TestNetwork, basicSeed } from '@atproto/dev-env'
|
|
5
5
|
import { forSnapshot } from '../_util.js'
|
|
@@ -23,12 +23,10 @@ describe('views with thread gating', () => {
|
|
|
23
23
|
email: 'eve@eve.com',
|
|
24
24
|
password: 'hunter2',
|
|
25
25
|
})
|
|
26
|
-
await network.processAll()
|
|
27
26
|
})
|
|
28
27
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
})
|
|
28
|
+
beforeEach(async () => network.processAll())
|
|
29
|
+
afterAll(async () => network?.close())
|
|
32
30
|
|
|
33
31
|
// check that replyDisabled state is applied correctly in a simple method like getPosts
|
|
34
32
|
const checkReplyDisabled = async (
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import assert from 'node:assert'
|
|
2
|
-
import { afterAll, beforeAll, describe, expect, it } from 'vitest'
|
|
2
|
+
import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
|
|
3
3
|
import {
|
|
4
4
|
AppBskyFeedDefs,
|
|
5
5
|
AppBskyFeedGetTimeline,
|
|
@@ -35,7 +35,7 @@ describe('timeline views', () => {
|
|
|
35
35
|
agent = network.bsky.getAgent()
|
|
36
36
|
sc = network.getSeedClient()
|
|
37
37
|
await basicSeed(sc)
|
|
38
|
-
|
|
38
|
+
|
|
39
39
|
alice = sc.dids.alice
|
|
40
40
|
bob = sc.dids.bob
|
|
41
41
|
carol = sc.dids.carol
|
|
@@ -54,9 +54,8 @@ describe('timeline views', () => {
|
|
|
54
54
|
})
|
|
55
55
|
})
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
})
|
|
57
|
+
beforeEach(async () => network.processAll())
|
|
58
|
+
afterAll(async () => network?.close())
|
|
60
59
|
|
|
61
60
|
// @TODO(bsky) blocks posts, reposts, replies by actor takedown via labels
|
|
62
61
|
// @TODO(bsky) blocks posts, reposts, replies by record takedown via labels
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import assert from 'node:assert'
|
|
2
|
-
import { afterAll, beforeAll, describe, expect, it } from 'vitest'
|
|
2
|
+
import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
|
|
3
3
|
import { AppBskyActorDefs, AtpAgent, ids } from '@atproto/api'
|
|
4
4
|
import { SeedClient, TestNetwork, verificationsSeed } from '@atproto/dev-env'
|
|
5
5
|
|
|
@@ -41,7 +41,6 @@ describe('verification views', () => {
|
|
|
41
41
|
sc = network.getSeedClient()
|
|
42
42
|
|
|
43
43
|
await verificationsSeed(sc)
|
|
44
|
-
await network.processAll()
|
|
45
44
|
|
|
46
45
|
labelerDid = network.bsky.ctx.cfg.modServiceDid
|
|
47
46
|
alice = sc.dids.alice
|
|
@@ -63,12 +62,11 @@ describe('verification views', () => {
|
|
|
63
62
|
.set({ trustedVerifier: true })
|
|
64
63
|
.where('did', 'in', [verifier1, verifier2, verifier3])
|
|
65
64
|
.execute()
|
|
66
|
-
}, 20_000) // @NOTE seeding can take a while
|
|
67
|
-
|
|
68
|
-
afterAll(async () => {
|
|
69
|
-
await network.close()
|
|
70
65
|
})
|
|
71
66
|
|
|
67
|
+
beforeEach(async () => network.processAll())
|
|
68
|
+
afterAll(async () => network?.close())
|
|
69
|
+
|
|
72
70
|
describe('profile views', () => {
|
|
73
71
|
const testCases: ProfileViewTestCase[] = [
|
|
74
72
|
{
|