aboutsummaryrefslogtreecommitdiff
path: root/tests/operations.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/operations.test.ts')
-rw-r--r--tests/operations.test.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/operations.test.ts b/tests/operations.test.ts
index 14fe768..6acca31 100644
--- a/tests/operations.test.ts
+++ b/tests/operations.test.ts
@@ -8,9 +8,12 @@ import { expect, test } from "vitest";
/*** UTILITY ------------------------------------------ ***/
-import { deriveTitle, parseOperations } from "../source/library/graphql/operations.ts";
+import {
+ deriveTitle,
+ parseOperations
+} from "../source/library/graphql/operations.ts";
-/*** TESTS -------------------------------------------- ***/
+/*** PROGRAM ------------------------------------------ ***/
test("parseOperations returns empty for blank query", () => {
expect(parseOperations("")).toEqual([]);
@@ -37,6 +40,7 @@ test("parseOperations captures multiple operations", () => {
mutation Bar { b }
subscription Baz { c }
`);
+
expect(ops).toEqual([
{ name: "Foo", type: "query" },
{ name: "Bar", type: "mutation" },