Skip to content

Commit 770d801

Browse files
committed
Remove undefined argument from test
1 parent f5928cd commit 770d801

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/__tests__/QueryComplexity-test.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import ComplexityVisitor from '../QueryComplexity';
2020

2121
describe('QueryComplexity analysis', () => {
2222
const typeInfo = new TypeInfo(schema);
23-
23+
2424
it('should consider default scalar cost', () => {
2525
const ast = parse(`
2626
query {
@@ -36,7 +36,7 @@ describe('QueryComplexity analysis', () => {
3636
visit(ast, visitWithTypeInfo(typeInfo, visitor));
3737
expect(visitor.complexity).to.equal(1);
3838
});
39-
39+
4040
it('should consider custom scalar cost', () => {
4141
const ast = parse(`
4242
query {
@@ -52,7 +52,7 @@ describe('QueryComplexity analysis', () => {
5252
visit(ast, visitWithTypeInfo(typeInfo, visitor));
5353
expect(visitor.complexity).to.equal(20);
5454
});
55-
55+
5656
it('should consider variable scalar cost', () => {
5757
const ast = parse(`
5858
query {
@@ -68,7 +68,7 @@ describe('QueryComplexity analysis', () => {
6868
visit(ast, visitWithTypeInfo(typeInfo, visitor));
6969
expect(visitor.complexity).to.equal(1000);
7070
});
71-
71+
7272
it('should not allow negative cost', () => {
7373
const ast = parse(`
7474
query {
@@ -84,7 +84,7 @@ describe('QueryComplexity analysis', () => {
8484
visit(ast, visitWithTypeInfo(typeInfo, visitor));
8585
expect(visitor.complexity).to.equal(0);
8686
});
87-
87+
8888
it('should report error above threshold', () => {
8989
const ast = parse(`
9090
query {
@@ -104,7 +104,7 @@ describe('QueryComplexity analysis', () => {
104104
'The query exceeds the maximum complexity of 100. Actual complexity is 1000'
105105
);
106106
});
107-
107+
108108
it('should add inline fragments', () => {
109109
const ast = parse(`
110110
query {
@@ -124,14 +124,14 @@ describe('QueryComplexity analysis', () => {
124124
visit(ast, visitWithTypeInfo(typeInfo, visitor));
125125
expect(visitor.complexity).to.equal(52);
126126
});
127-
127+
128128
it('should add fragments', () => {
129129
const ast = parse(`
130130
query {
131131
scalar
132132
...QueryFragment
133133
}
134-
134+
135135
fragment QueryFragment on Query {
136136
variableScalar(count: 2)
137137
}
@@ -145,7 +145,7 @@ describe('QueryComplexity analysis', () => {
145145
visit(ast, visitWithTypeInfo(typeInfo, visitor));
146146
expect(visitor.complexity).to.equal(21);
147147
});
148-
148+
149149
it('should add complexity for union types', () => {
150150
const ast = parse(`
151151
query {
@@ -166,7 +166,7 @@ describe('QueryComplexity analysis', () => {
166166
visit(ast, visitWithTypeInfo(typeInfo, visitor));
167167
expect(visitor.complexity).to.equal(22);
168168
});
169-
169+
170170
it('should add complexity for interface types', () => {
171171
const ast = parse(`
172172
query {
@@ -187,7 +187,7 @@ describe('QueryComplexity analysis', () => {
187187
visit(ast, visitWithTypeInfo(typeInfo, visitor));
188188
expect(visitor.complexity).to.equal(3);
189189
});
190-
190+
191191
it('should add complexity for inline fragments without type condition', () => {
192192
const ast = parse(`
193193
query {
@@ -207,7 +207,7 @@ describe('QueryComplexity analysis', () => {
207207
visit(ast, visitWithTypeInfo(typeInfo, visitor));
208208
expect(visitor.complexity).to.equal(2);
209209
});
210-
210+
211211
it('should add complexity for enum types', () => {
212212
const ast = parse(`
213213
query {
@@ -227,7 +227,7 @@ describe('QueryComplexity analysis', () => {
227227
it('should error on a missing non-null argument', () => {
228228
const ast = parse(`
229229
query {
230-
requiredArgs(notcount: 0)
230+
requiredArgs
231231
}
232232
`);
233233
const context = new ValidationContext(schema, ast, typeInfo);

0 commit comments

Comments
 (0)