mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
fix assertion for nested graphql response
This commit is contained in:
@@ -100,7 +100,7 @@ describe("MutationResolvers", () => {
|
|||||||
|
|
||||||
describe("cancelNotification", () => {
|
describe("cancelNotification", () => {
|
||||||
const query = `
|
const query = `
|
||||||
query CancelNotification($input: NotificationInput!) {
|
mutation CancelNotification($input: NotificationInput!) {
|
||||||
cancelNotification(input: $input) {
|
cancelNotification(input: $input) {
|
||||||
success
|
success
|
||||||
message
|
message
|
||||||
@@ -130,8 +130,9 @@ describe("MutationResolvers", () => {
|
|||||||
assert(response.body.kind === "single");
|
assert(response.body.kind === "single");
|
||||||
expect(response.body.singleResult.errors).toBeUndefined();
|
expect(response.body.singleResult.errors).toBeUndefined();
|
||||||
|
|
||||||
const cancelledNotification = response.body.singleResult.data?.cancelNotification as any;
|
const notificationResponse = response.body.singleResult.data?.cancelNotification as any;
|
||||||
expect(cancelledNotification).toStrictEqual(notificationInput);
|
expect(notificationResponse.success).toBe(true);
|
||||||
|
expect(notificationResponse.data).toStrictEqual(notificationInput);
|
||||||
|
|
||||||
expect(context.notificationService.isNotificationScheduled(notificationInput)).toBe(false);
|
expect(context.notificationService.isNotificationScheduled(notificationInput)).toBe(false);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user