Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commitdb43bfe

Browse files
kyarikIvanGoncharov
authored andcommitted
Improve test descriptions
1 parentb29fd62 commitdb43bfe

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

‎src/__tests__/http-test.ts

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ function runTests(server: Server) {
222222
});
223223
});
224224

225-
it('Reports validation errors',async()=>{
225+
it('reports validation errors',async()=>{
226226
constapp=server();
227227

228228
app.get(urlString(),graphqlHTTP({schema:TestSchema}));
@@ -248,7 +248,7 @@ function runTests(server: Server) {
248248
});
249249
});
250250

251-
it('Errors when missing operation name',async()=>{
251+
it('errors when missing operation name',async()=>{
252252
constapp=server();
253253

254254
app.get(urlString(),graphqlHTTP({schema:TestSchema}));
@@ -273,7 +273,7 @@ function runTests(server: Server) {
273273
});
274274
});
275275

276-
it('Errors when sending a mutation via GET',async()=>{
276+
it('errors when sending a mutation via GET',async()=>{
277277
constapp=server();
278278

279279
app.get(urlString(),graphqlHTTP({schema:TestSchema}));
@@ -295,7 +295,7 @@ function runTests(server: Server) {
295295
});
296296
});
297297

298-
it('Errors when selecting a mutation within a GET',async()=>{
298+
it('errors when selecting a mutation within a GET',async()=>{
299299
constapp=server();
300300

301301
app.get(urlString(),graphqlHTTP({schema:TestSchema}));
@@ -321,7 +321,7 @@ function runTests(server: Server) {
321321
});
322322
});
323323

324-
it('Allows a mutation to exist within a GET',async()=>{
324+
it('allows a mutation to exist within a GET',async()=>{
325325
constapp=server();
326326

327327
app.get(urlString(),graphqlHTTP({schema:TestSchema}));
@@ -344,7 +344,7 @@ function runTests(server: Server) {
344344
});
345345
});
346346

347-
it('Allows async resolvers',async()=>{
347+
it('allows async resolvers',async()=>{
348348
constschema=newGraphQLSchema({
349349
query:newGraphQLObjectType({
350350
name:'Query',
@@ -372,7 +372,7 @@ function runTests(server: Server) {
372372
});
373373
});
374374

375-
it('Allows passing in a context',async()=>{
375+
it('allows passing in a context',async()=>{
376376
constschema=newGraphQLSchema({
377377
query:newGraphQLObjectType({
378378
name:'Query',
@@ -408,7 +408,7 @@ function runTests(server: Server) {
408408
});
409409
});
410410

411-
it('Allows passing in a fieldResolver',async()=>{
411+
it('allows passing in a fieldResolver',async()=>{
412412
constschema=buildSchema(`
413413
type Query {
414414
test: String
@@ -438,7 +438,7 @@ function runTests(server: Server) {
438438
});
439439
});
440440

441-
it('Allows passing in a typeResolver',async()=>{
441+
it('allows passing in a typeResolver',async()=>{
442442
constschema=buildSchema(`
443443
type Foo {
444444
foo: String
@@ -479,7 +479,7 @@ function runTests(server: Server) {
479479
});
480480
});
481481

482-
it('Uses request as context by default',async()=>{
482+
it('uses request as context by default',async()=>{
483483
constschema=newGraphQLSchema({
484484
query:newGraphQLObjectType({
485485
name:'Query',
@@ -515,7 +515,7 @@ function runTests(server: Server) {
515515
});
516516
});
517517

518-
it('Allows returning an options Promise',async()=>{
518+
it('allows returning an options Promise',async()=>{
519519
constapp=server();
520520

521521
app.get(
@@ -536,7 +536,7 @@ function runTests(server: Server) {
536536
expect(response.text).to.equal('{"data":{"test":"Hello World"}}');
537537
});
538538

539-
it('Provides an options function with arguments',async()=>{
539+
it('provides an options function with arguments',async()=>{
540540
constapp=server();
541541

542542
letseenRequest;
@@ -571,7 +571,7 @@ function runTests(server: Server) {
571571
});
572572
});
573573

574-
it('Catches errors thrown from options function',async()=>{
574+
it('catches errors thrown from options function',async()=>{
575575
constapp=server();
576576

577577
app.get(
@@ -613,7 +613,7 @@ function runTests(server: Server) {
613613
expect(response.text).to.equal('{"data":{"test":"Hello World"}}');
614614
});
615615

616-
it('Allows sending a mutation via POST',async()=>{
616+
it('allows sending a mutation via POST',async()=>{
617617
constapp=server();
618618

619619
app.post(urlString(),graphqlHTTP({schema:TestSchema}));
@@ -1658,7 +1658,7 @@ function runTests(server: Server) {
16581658
});
16591659

16601660
describe('Built-in GraphiQL support',()=>{
1661-
it('does notrenders GraphiQL if no opt-in',async()=>{
1661+
it('does notrender GraphiQL if no opt-in',async()=>{
16621662
constapp=server();
16631663

16641664
app.get(urlString(),graphqlHTTP({schema:TestSchema}));
@@ -1829,7 +1829,7 @@ function runTests(server: Server) {
18291829
);
18301830
});
18311831

1832-
it('GraphiQLrenders provided variables',async()=>{
1832+
it('renders provided variables within GraphiQL',async()=>{
18331833
constapp=server();
18341834

18351835
app.get(
@@ -1858,7 +1858,7 @@ function runTests(server: Server) {
18581858
);
18591859
});
18601860

1861-
it('GraphiQLaccepts an empty query',async()=>{
1861+
it('accepts an empty query when rendering GraphiQL',async()=>{
18621862
constapp=server();
18631863

18641864
app.get(
@@ -1879,7 +1879,7 @@ function runTests(server: Server) {
18791879
expect(response.text).to.include('response: undefined');
18801880
});
18811881

1882-
it('GraphiQLaccepts a mutation query - does not execute it',async()=>{
1882+
it('accepts a mutation query when rendering GraphiQL - does not execute it',async()=>{
18831883
constapp=server();
18841884

18851885
app.get(
@@ -2115,7 +2115,7 @@ function runTests(server: Server) {
21152115
};
21162116
};
21172117

2118-
it('Do not execute a query ifit do not passthe custom validation.',async()=>{
2118+
it('does not execute a query if the custom validation does not pass',async()=>{
21192119
constapp=server();
21202120

21212121
app.get(
@@ -2144,8 +2144,8 @@ function runTests(server: Server) {
21442144
});
21452145
});
21462146

2147-
describe('Custom execute',()=>{
2148-
it('allow to replace default execute',async()=>{
2147+
describe('Custom execute function',()=>{
2148+
it('allows to replacethedefault execute function',async()=>{
21492149
constapp=server();
21502150

21512151
letseenExecuteArgs;
@@ -2247,7 +2247,7 @@ function runTests(server: Server) {
22472247
});
22482248

22492249
describe('Custom result extensions',()=>{
2250-
it('allowsforadding extensions',async()=>{
2250+
it('allows adding extensions',async()=>{
22512251
constapp=server();
22522252

22532253
app.get(
@@ -2273,7 +2273,7 @@ function runTests(server: Server) {
22732273
);
22742274
});
22752275

2276-
it('extensionshaveaccess to initial GraphQL result',async()=>{
2276+
it('givesextensions access to the initial GraphQL result',async()=>{
22772277
constapp=server();
22782278

22792279
app.get(
@@ -2314,7 +2314,7 @@ function runTests(server: Server) {
23142314
});
23152315
});
23162316

2317-
it('extensionfunctionmay be async',async()=>{
2317+
it('allows the extensionsfunctionto be async',async()=>{
23182318
constapp=server();
23192319

23202320
app.get(

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp