Skip to content

Commit abcb3b3

Browse files
lists-test: remove unneeded async (#2755)
1 parent dd52a15 commit abcb3b3

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/execution/__tests__/lists-test.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,53 +5,53 @@ import { parse } from '../../language/parser';
55

66
import { buildSchema } from '../../utilities/buildASTSchema';
77

8-
import { execute } from '../execute';
8+
import { execute, executeSync } from '../execute';
99

1010
describe('Execute: Accepts any iterable as list value', () => {
1111
function complete(rootValue: mixed) {
12-
return execute({
12+
return executeSync({
1313
schema: buildSchema('type Query { listField: [String] }'),
1414
document: parse('{ listField }'),
1515
rootValue,
1616
});
1717
}
1818

19-
it('Accepts a Set as a List value', async () => {
19+
it('Accepts a Set as a List value', () => {
2020
const listField = new Set(['apple', 'banana', 'apple', 'coconut']);
2121

22-
expect(await complete({ listField })).to.deep.equal({
22+
expect(complete({ listField })).to.deep.equal({
2323
data: { listField: ['apple', 'banana', 'coconut'] },
2424
});
2525
});
2626

27-
it('Accepts an Generator function as a List value', async () => {
27+
it('Accepts an Generator function as a List value', () => {
2828
function* yieldItems() {
2929
yield 'one';
3030
yield 2;
3131
yield true;
3232
}
3333
const listField = yieldItems();
3434

35-
expect(await complete({ listField })).to.deep.equal({
35+
expect(complete({ listField })).to.deep.equal({
3636
data: { listField: ['one', '2', 'true'] },
3737
});
3838
});
3939

40-
it('Accepts function arguments as a List value', async () => {
40+
it('Accepts function arguments as a List value', () => {
4141
function getArgs(...args: Array<string>) {
4242
return args;
4343
}
4444
const listField = getArgs('one', 'two');
4545

46-
expect(await complete({ listField })).to.deep.equal({
46+
expect(complete({ listField })).to.deep.equal({
4747
data: { listField: ['one', 'two'] },
4848
});
4949
});
5050

51-
it('Does not accept (Iterable) String-literal as a List value', async () => {
51+
it('Does not accept (Iterable) String-literal as a List value', () => {
5252
const listField = 'Singular';
5353

54-
expect(await complete({ listField })).to.deep.equal({
54+
expect(complete({ listField })).to.deep.equal({
5555
data: { listField: null },
5656
errors: [
5757
{

0 commit comments

Comments
 (0)