Skip to content

Commit 5f9b723

Browse files
committed
test(graphql): add spec for null operation
1 parent 88acdc0 commit 5f9b723

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/dsl/graphql.spec.ts

+10
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@ describe("GraphQLInteraction", () => {
2929
expect(interaction.withOperation.bind("aoeu")).to.throw(Error)
3030
})
3131
})
32+
describe("when given a null operation", () => {
33+
it("creates a GrphQL Interaction", () => {
34+
interaction.uponReceiving("a request")
35+
interaction.withOperation(null)
36+
interaction.withQuery("{ hello }")
37+
38+
const json: any = interaction.json()
39+
expect(json.request.body.operationName).to.eq(null)
40+
})
41+
})
3242
})
3343

3444
describe("#withVariables", () => {

0 commit comments

Comments
 (0)