listCommentReports,
randomString,
API,
+ unfollows,
} from './shared';
import { CommentView } from 'lemmy-js-client';
beforeAll(async () => {
await setupLogins();
+ await unfollows();
await followBeta(alpha);
await followBeta(gamma);
let betaCommunity = (await resolveBetaCommunity(alpha)).community;
});
afterAll(async () => {
- await unfollowRemotes(alpha);
- await unfollowRemotes(gamma);
+ await unfollows();
});
function assertCommentFederation(
randomString,
registerUser,
API,
- getSite
+ getSite,
+ unfollows
} from './shared';
import { PostView, CommunityView } from 'lemmy-js-client';
await unfollows();
});
-async function unfollows() {
- await unfollowRemotes(alpha);
- await unfollowRemotes(gamma);
- await unfollowRemotes(delta);
- await unfollowRemotes(epsilon);
-}
-
function assertPostFederation(postOne: PostView, postTwo: PostView) {
expect(postOne.post.ap_id).toBe(postTwo.post.ap_id);
expect(postOne.post.name).toBe(postTwo.post.name);
expect(betaReport.original_post_url).toBe(alphaReport.original_post_url);
expect(betaReport.original_post_body).toBe(alphaReport.original_post_body);
expect(betaReport.reason).toBe(alphaReport.reason);
-});
\ No newline at end of file
+});
}
return result;
}
+
+export async function unfollows() {
+ await unfollowRemotes(alpha);
+ await unfollowRemotes(gamma);
+ await unfollowRemotes(delta);
+ await unfollowRemotes(epsilon);
+}