Import Instagram archive to a Bluesky account
9
fork

Configure Feed

Select the types of activity you want to include in your feed.

fixed bluesky client unit tests.

+9 -10
+9 -10
tests/bluesky.test.ts
··· 3 3 jest.mock('@atproto/api', () => ({ 4 4 AtpAgent: jest.fn().mockImplementation(() => ({ 5 5 login: jest.fn(), 6 - post: jest.fn().mockResolvedValue({ uri: 'test/uri/123' }), 6 + post: jest.fn().mockResolvedValue({ uri: 'at://did:plc:test/app.bsky.feed.post/123' }), 7 + uploadBlob: jest.fn().mockResolvedValue({ 8 + data: { blob: { $type: 'blob', ref: { $link: 'test-blob-ref' } } } 9 + }), 7 10 api: { 8 11 app: { 9 12 bsky: { ··· 83 86 test('should create video post successfully', async () => { 84 87 const videoEmbed = { 85 88 $type: 'app.bsky.embed.video', 86 - video: { 87 - $type: 'blob', 88 - ref: { $link: '' }, // Empty ref to trigger upload 89 - mimeType: 'video/mp4', 90 - size: 1000, 91 - buffer: Buffer.from('test video') // Add buffer for upload 92 - }, 93 - aspectRatio: { width: 640, height: 480 } 89 + alt: 'test video', 90 + buffer: Buffer.from('test video'), 91 + mimeType: 'video/mp4', 92 + size: 1000 94 93 }; 95 94 96 95 const postUrl = await client.createPost( ··· 99 98 videoEmbed 100 99 ); 101 100 102 - expect(postUrl).toContain('https://bsky.app/profile/test-user/post/'); 101 + expect(postUrl).toContain('https://bsky.app/profile/test-user/post/123'); 103 102 }); 104 103 105 104 xtest('should handle video upload timeout', async () => {