jest.setTimeout(120000);
+import { CommunityView } from 'lemmy-js-client';
+
import {
alpha,
beta,
getCommunity,
followCommunity,
} from './shared';
-import { CommunityView } from 'lemmy-js-client';
beforeAll(async () => {
await setupLogins();
expect(communityOne.community.actor_id).toBe(communityTwo.community.actor_id);
expect(communityOne.community.name).toBe(communityTwo.community.name);
expect(communityOne.community.title).toBe(communityTwo.community.title);
- expect(communityOne.community.description).toBe(
- communityTwo.community.description
+ expect(communityOne.community.description.unwrapOr("none")).toBe(
+ communityTwo.community.description.unwrapOr("none")
);
- expect(communityOne.community.icon).toBe(communityTwo.community.icon);
- expect(communityOne.community.banner).toBe(communityTwo.community.banner);
+ expect(communityOne.community.icon.unwrapOr("none")).toBe(communityTwo.community.icon.unwrapOr("none"));
+ expect(communityOne.community.banner.unwrapOr("none")).toBe(communityTwo.community.banner.unwrapOr("none"));
expect(communityOne.community.published).toBe(
communityTwo.community.published
);
// Cache the community on beta, make sure it has the other fields
let searchShort = `!${prevName}@lemmy-alpha:8541`;
- let betaCommunity = (await resolveCommunity(beta, searchShort)).community;
+ let betaCommunity = (await resolveCommunity(beta, searchShort)).community.unwrap();
assertCommunityFederation(betaCommunity, communityRes.community_view);
});
// Cache the community on Alpha
let searchShort = `!${communityRes.community_view.community.name}@lemmy-beta:8551`;
- let alphaCommunity = (await resolveCommunity(alpha, searchShort)).community;
+ let alphaCommunity = (await resolveCommunity(alpha, searchShort)).community.unwrap();
assertCommunityFederation(alphaCommunity, communityRes.community_view);
// Follow the community from alpha
// Cache the community on Alpha
let searchShort = `!${communityRes.community_view.community.name}@lemmy-beta:8551`;
- let alphaCommunity = (await resolveCommunity(alpha, searchShort)).community;
+ let alphaCommunity = (await resolveCommunity(alpha, searchShort)).community.unwrap();
assertCommunityFederation(alphaCommunity, communityRes.community_view);
// Follow the community from alpha
expect(communityRes.community_view.community.name).toBeDefined();
let searchShort = `!${communityRes.community_view.community.name}@lemmy-beta:8551`;
- let alphaCommunity = (await resolveCommunity(alpha, searchShort)).community;
+ let alphaCommunity = (await resolveCommunity(alpha, searchShort)).community.unwrap();
assertCommunityFederation(alphaCommunity, communityRes.community_view);
});