Skip to content

Commit

Permalink
test: add test to default image query inside file
Browse files Browse the repository at this point in the history
  • Loading branch information
braposo committed May 26, 2019
1 parent 7589201 commit f367f68
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/__tests__/file.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,20 @@ describe("File", () => {
data: { file: { name: "figma-graphql test file" } },
});
});

test("can get file default images", async () => {
const query = `
query {
file(id: "${figmaFile}") {
images {
id
}
}
}
`;

await expect(graphql(schema, query, null, { fileId: figmaFile })).resolves.toEqual({
data: { file: { images: [{ id: "0:1" }] } },
});
});
});

0 comments on commit f367f68

Please sign in to comment.