1- import { bench , describe } from " vitest" ;
1+ import { bench , describe } from ' vitest' ;
22
33import { parse } from '../language/parser.js' ;
44
@@ -17,6 +17,7 @@ function syncListField() {
1717 return results ;
1818}
1919
20+ // eslint-disable-next-line @typescript-eslint/require-await
2021async function asyncListField ( ) {
2122 const results = [ ] ;
2223 for ( let index = 0 ; index < 1000 ; index ++ ) {
@@ -25,22 +26,23 @@ async function asyncListField() {
2526 return results ;
2627}
2728
29+ // eslint-disable-next-line @typescript-eslint/require-await
2830async function * asyncIterableListField ( ) {
2931 for ( let index = 0 ; index < 1000 ; index ++ ) {
3032 yield index ;
3133 }
3234}
3335
34- describe ( " execute listField benchmarks" , ( ) => {
35- bench ( " Execute Synchronous List Field" , async ( ) => {
36+ describe ( ' execute listField benchmarks' , ( ) => {
37+ bench ( ' Execute Synchronous List Field' , async ( ) => {
3638 await execute ( { schema, document, rootValue : { listField : syncListField } } ) ;
3739 } ) ;
3840
39- bench ( " Execute Asynchronous List Field" , async ( ) => {
41+ bench ( ' Execute Asynchronous List Field' , async ( ) => {
4042 await execute ( { schema, document, rootValue : { listField : asyncListField } } ) ;
4143 } ) ;
4244
43- bench ( " Execute Async Iterable List Field" , async ( ) => {
45+ bench ( ' Execute Async Iterable List Field' , async ( ) => {
4446 await execute ( { schema, document, rootValue : { listField : asyncIterableListField } } ) ;
4547 } ) ;
4648} ) ;
0 commit comments