Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit dc9b76e

Browse files
committedDec 5, 2024·
fix testing
1 parent 7207561 commit dc9b76e

File tree

3 files changed

+96
-94
lines changed

3 files changed

+96
-94
lines changed
 

‎out/test-export-2024-01-01.tar

1.5 KB
Binary file not shown.

‎test/fixtures/outbox.ts

+95-93
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,101 @@
1-
export const outbox = {
2-
"@context": "https://www.w3.org/ns/activitystreams",
3-
"id": "outbox.json",
4-
"type": "OrderedCollection",
5-
"totalItems": 3,
6-
"orderedItems": [
7-
{
8-
"@context": "https://www.w3.org/ns/activitystreams",
9-
"id": "https://example.com/users/alice/statuses/109407353983685867/activity",
10-
"type": "Announce",
11-
"actor": "https://example.com/users/alice",
12-
"published": "2022-11-26T00:48:56Z",
13-
"to": [
14-
"https://www.w3.org/ns/activitystreams#Public"
15-
],
16-
"cc": [
17-
"https://mastodon.social/users/bobwyman",
18-
"https://example.com/users/alice/followers"
19-
],
20-
"object": "https://mastodon.social/users/bobwyman/statuses/109399822260648081"
21-
},
22-
{
23-
"@context": "https://www.w3.org/ns/activitystreams",
24-
"id": "https://example.com/users/alice/statuses/109412389200730237/activity",
25-
"type": "Announce",
26-
"actor": "https://example.com/users/alice",
27-
"published": "2022-11-26T22:09:27Z",
28-
"to": [
29-
"https://www.w3.org/ns/activitystreams#Public"
30-
],
31-
"cc": [
32-
"https://omfg.town/users/dansinker",
33-
"https://example.com/users/alice/followers"
34-
],
35-
"object": "https://omfg.town/users/dansinker/statuses/109411849664571485"
36-
},
37-
{
38-
"id": "https://example.com/users/alice/statuses/109419229622587183/activity",
39-
"type": "Create",
40-
"actor": "https://example.com/users/alice",
41-
"published": "2022-11-28T03:09:04Z",
42-
"to": [
43-
"https://www.w3.org/ns/activitystreams#Public"
44-
],
45-
"cc": [
46-
"https://example.com/users/alice/followers",
47-
"https://mindly.social/users/djdellamorte"
48-
],
49-
"object": {
50-
"id": "https://example.com/users/alice/statuses/109419229622587183",
51-
"type": "Note",
52-
"summary": null,
53-
"inReplyTo": "https://mindly.social/users/djdellamorte/statuses/109417853187485668",
54-
"published": "2022-11-28T03:09:04Z",
55-
"url": "https://example.com/@alice/109419229622587183",
56-
"attributedTo": "https://example.com/users/alice",
57-
"to": [
58-
"https://www.w3.org/ns/activitystreams#Public"
1+
export const outbox = [
2+
{
3+
'@context': 'https://www.w3.org/ns/activitystreams',
4+
id: 'outbox.json',
5+
type: 'OrderedCollection',
6+
totalItems: 3,
7+
orderedItems: [
8+
{
9+
'@context': 'https://www.w3.org/ns/activitystreams',
10+
id: 'https://example.com/users/alice/statuses/109407353983685867/activity',
11+
type: 'Announce',
12+
actor: 'https://example.com/users/alice',
13+
published: '2022-11-26T00:48:56Z',
14+
to: ['https://www.w3.org/ns/activitystreams#Public'],
15+
cc: [
16+
'https://mastodon.social/users/bobwyman',
17+
'https://example.com/users/alice/followers'
5918
],
60-
"cc": [
61-
"https://example.com/users/alice/followers",
62-
"https://mindly.social/users/djdellamorte"
19+
object:
20+
'https://mastodon.social/users/bobwyman/statuses/109399822260648081'
21+
},
22+
{
23+
'@context': 'https://www.w3.org/ns/activitystreams',
24+
id: 'https://example.com/users/alice/statuses/109412389200730237/activity',
25+
type: 'Announce',
26+
actor: 'https://example.com/users/alice',
27+
published: '2022-11-26T22:09:27Z',
28+
to: ['https://www.w3.org/ns/activitystreams#Public'],
29+
cc: [
30+
'https://omfg.town/users/dansinker',
31+
'https://example.com/users/alice/followers'
6332
],
64-
"sensitive": false,
65-
"atomUri": "https://example.com/users/alice/statuses/109419229622587183",
66-
"inReplyToAtomUri": "https://mindly.social/users/djdellamorte/statuses/109417853187485668",
67-
"conversation": "tag:mindly.social,2022-11-27:objectId=5397243:objectType=Conversation",
68-
"content": "<p><span class=\"h-card\"><a href=\"https://mindly.social/@djdellamorte\" class=\"u-url mention\">@<span>djdellamorte</span></a></span> I see them used a lot as a teleprompter, when recording videos or podcasts.</p>",
69-
"contentMap": {
70-
"en": "<p><span class=\"h-card\"><a href=\"https://mindly.social/@djdellamorte\" class=\"u-url mention\">@<span>djdellamorte</span></a></span> I see them used a lot as a teleprompter, when recording videos or podcasts.</p>"
71-
},
72-
"attachment": [],
73-
"tag": [
74-
{
75-
"type": "Mention",
76-
"href": "https://mindly.social/users/djdellamorte",
77-
"name": "@djdellamorte@mindly.social"
78-
}
33+
object: 'https://omfg.town/users/dansinker/statuses/109411849664571485'
34+
},
35+
{
36+
id: 'https://example.com/users/alice/statuses/109419229622587183/activity',
37+
type: 'Create',
38+
actor: 'https://example.com/users/alice',
39+
published: '2022-11-28T03:09:04Z',
40+
to: ['https://www.w3.org/ns/activitystreams#Public'],
41+
cc: [
42+
'https://example.com/users/alice/followers',
43+
'https://mindly.social/users/djdellamorte'
7944
],
80-
"replies": {
81-
"id": "https://example.com/users/alice/statuses/109419229622587183/replies",
82-
"type": "Collection",
83-
"first": {
84-
"type": "CollectionPage",
85-
"next": "https://example.com/users/alice/statuses/109419229622587183/replies?only_other_accounts=true&page=true",
86-
"partOf": "https://example.com/users/alice/statuses/109419229622587183/replies",
87-
"items": []
45+
object: {
46+
id: 'https://example.com/users/alice/statuses/109419229622587183',
47+
type: 'Note',
48+
summary: null,
49+
inReplyTo:
50+
'https://mindly.social/users/djdellamorte/statuses/109417853187485668',
51+
published: '2022-11-28T03:09:04Z',
52+
url: 'https://example.com/@alice/109419229622587183',
53+
attributedTo: 'https://example.com/users/alice',
54+
to: ['https://www.w3.org/ns/activitystreams#Public'],
55+
cc: [
56+
'https://example.com/users/alice/followers',
57+
'https://mindly.social/users/djdellamorte'
58+
],
59+
sensitive: false,
60+
atomUri:
61+
'https://example.com/users/alice/statuses/109419229622587183',
62+
inReplyToAtomUri:
63+
'https://mindly.social/users/djdellamorte/statuses/109417853187485668',
64+
conversation:
65+
'tag:mindly.social,2022-11-27:objectId=5397243:objectType=Conversation',
66+
content:
67+
'<p><span class="h-card"><a href="https://mindly.social/@djdellamorte" class="u-url mention">@<span>djdellamorte</span></a></span> I see them used a lot as a teleprompter, when recording videos or podcasts.</p>',
68+
contentMap: {
69+
en: '<p><span class="h-card"><a href="https://mindly.social/@djdellamorte" class="u-url mention">@<span>djdellamorte</span></a></span> I see them used a lot as a teleprompter, when recording videos or podcasts.</p>'
70+
},
71+
attachment: [],
72+
tag: [
73+
{
74+
type: 'Mention',
75+
href: 'https://mindly.social/users/djdellamorte',
76+
name: '@djdellamorte@mindly.social'
77+
}
78+
],
79+
replies: {
80+
id: 'https://example.com/users/alice/statuses/109419229622587183/replies',
81+
type: 'Collection',
82+
first: {
83+
type: 'CollectionPage',
84+
next: 'https://example.com/users/alice/statuses/109419229622587183/replies?only_other_accounts=true&page=true',
85+
partOf:
86+
'https://example.com/users/alice/statuses/109419229622587183/replies',
87+
items: []
88+
}
8889
}
90+
},
91+
signature: {
92+
type: 'RsaSignature2017',
93+
creator: 'https://example.com/users/alice#main-key',
94+
created: '2023-05-09T02:46:04Z',
95+
signatureValue:
96+
'eLb+AzyjDei4G6MkRlw/CCxObyWS+dMAo+8NlvPATt9xjud+KLSq8oc9vaSEYk+3uovw5XfdVdlFF+FAgq1kDGJJfGq4xOVpm8JzLtqbMsEfB6BFAEGyCvO8iQD9pFhNRrzZOKoznKrnFjLnItbv9eyNefZISEqHRuO6wHcfTvuPGrChwNPg9FKUQaSvB1wx9KShgypzcQbZA5BMXhJSQGcIIZXGa2GenXi6brGlIorFxb5nNtJnGpn2kxKHQpcfFsA4L2q/sIzVYTPO+O/KyLtjWIaITHm0R1SeToGK47M/yOR3a/7oh/r/5ncKornLnTwKW+EBn41E8cxMnHIZsw=='
8997
}
90-
},
91-
"signature": {
92-
"type": "RsaSignature2017",
93-
"creator": "https://example.com/users/alice#main-key",
94-
"created": "2023-05-09T02:46:04Z",
95-
"signatureValue": "eLb+AzyjDei4G6MkRlw/CCxObyWS+dMAo+8NlvPATt9xjud+KLSq8oc9vaSEYk+3uovw5XfdVdlFF+FAgq1kDGJJfGq4xOVpm8JzLtqbMsEfB6BFAEGyCvO8iQD9pFhNRrzZOKoznKrnFjLnItbv9eyNefZISEqHRuO6wHcfTvuPGrChwNPg9FKUQaSvB1wx9KShgypzcQbZA5BMXhJSQGcIIZXGa2GenXi6brGlIorFxb5nNtJnGpn2kxKHQpcfFsA4L2q/sIzVYTPO+O/KyLtjWIaITHm0R1SeToGK47M/yOR3a/7oh/r/5ncKornLnTwKW+EBn41E8cxMnHIZsw=="
9698
}
97-
},
98-
]
99-
}
99+
]
100+
}
101+
]

‎test/index.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ describe('exportActorProfile', () => {
1010
it('calls function', async () => {
1111
const filename = 'out/test-export-2024-01-01.tar'
1212
const tarball = fs.createWriteStream(filename)
13-
const packStream = exportActorProfile({ actorProfile, outbox })
13+
const packStream = await exportActorProfile({ actorProfile, outbox })
1414

1515
packStream.pipe(tarball)
1616
})

0 commit comments

Comments
 (0)
Please sign in to comment.