Skip to content

Commit

Permalink
fix: Fix /v1/instance/translation_languages assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
neet committed Aug 10, 2023
1 parent f5d83e1 commit a531d3c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/mastodon/entities/v1/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ export interface List {
*/
repliesPolicy: ListRepliesPolicy;
/** https://github.com/mastodon/mastodon/pull/22048/files */
isExclusive: boolean;
exclusive: boolean;
}
2 changes: 2 additions & 0 deletions src/mastodon/rest/v1/list-repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import { type DefaultPaginationParams } from "../../repository";
export interface CreateListParams {
/** The title of the list to be created. */
readonly title: string;
/** https://github.com/mastodon/mastodon/pull/22048/files */
readonly exclusive?: boolean;
}

export type UpdateListParams = CreateListParams;
Expand Down
5 changes: 5 additions & 0 deletions tests/rest/v1/admin/trends.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ describe("trends", () => {
expect(links).toEqual(expect.any(Array));
});

it("fetches link publishers", async () => {
const links = await admin.v1.admin.trends.links.publishers.list();
expect(links).toEqual(expect.any(Array));
});

it("fetches statuses", async () => {
const statuses = await admin.v1.admin.trends.statuses.list();
expect(statuses).toEqual(expect.any(Array));
Expand Down
2 changes: 1 addition & 1 deletion tests/rest/v1/instance.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ it("lists languages", () => {
it("lists translatable languages", () => {
return sessions.use(async (client) => {
const languages = await client.rest.v1.instance.translationLanguages.list();
expect(languages).toMatchInlineSnapshot(`{}`);
expect(languages).toEqual(expect.any(Object));
});
});

0 comments on commit a531d3c

Please sign in to comment.