We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3704cd6 commit 4847862Copy full SHA for 4847862
1 file changed
library/sources/GraphQL.schema.tests.ts
@@ -25,6 +25,15 @@ function getTestContext(): Context {
25
}
26
27
export function createGraphQLTests(pkgName: string) {
28
+ function expectedDSL(dsl: string): string {
29
+ if (pkgName === "graphql-v15") {
30
+ // GraphQL v15 printSchema adds a new line at the end
31
+ return dsl + "\n";
32
+ }
33
+
34
+ return dsl;
35
36
37
t.test("it works", async () => {
38
const api = new ReportingAPIForTesting();
39
const agent = startTestAgent({
@@ -163,7 +172,7 @@ type Author {
163
172
hits: hits,
164
173
graphql: undefined,
165
174
apispec: {},
166
- graphQLSchema: dsl,
175
+ graphQLSchema: expectedDSL(dsl),
167
176
},
168
177
{
169
178
method: "POST",
0 commit comments