2020-04-25 23:03:58 -07:00
|
|
|
const gql = require("graphql-tag");
|
|
|
|
|
const { query, getDbCalls } = require("./setup.js");
|
|
|
|
|
|
|
|
|
|
describe("Pet", () => {
|
|
|
|
|
it("looks up a pet", async () => {
|
|
|
|
|
const res = await query({
|
|
|
|
|
query: gql`
|
|
|
|
|
query {
|
|
|
|
|
petOnNeopetsDotCom(petName: "roopal27") {
|
|
|
|
|
species {
|
|
|
|
|
id
|
|
|
|
|
}
|
|
|
|
|
color {
|
|
|
|
|
id
|
|
|
|
|
}
|
2020-05-23 13:55:59 -07:00
|
|
|
pose
|
2020-04-25 23:03:58 -07:00
|
|
|
items {
|
|
|
|
|
id
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
`,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
expect(res).toHaveNoErrors();
|
|
|
|
|
expect(res.data).toMatchSnapshot();
|
|
|
|
|
expect(getDbCalls()).toMatchInlineSnapshot(`Array []`);
|
|
|
|
|
});
|
|
|
|
|
});
|