Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/execution/__tests__/abstract-promise-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @noflow
* @flow strict
*/

import { expect } from 'chai';
Expand All @@ -21,20 +21,28 @@ import {
} from '../../';

class Dog {
name: string;
woofs: boolean;

constructor(name, woofs) {
this.name = name;
this.woofs = woofs;
}
}

class Cat {
name: string;
meows: boolean;

constructor(name, meows) {
this.name = name;
this.meows = meows;
}
}

class Human {
name: string;

constructor(name) {
this.name = name;
}
Expand Down
4 changes: 2 additions & 2 deletions src/execution/__tests__/lists-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @noflow
* @flow strict
*/

import { expect } from 'chai';
Expand Down Expand Up @@ -76,7 +76,7 @@ describe('Execute: Accepts any iterable as list value', () => {
}),
);

function getArgs() {
function getArgs(..._args) {
return arguments;
}

Expand Down
4 changes: 3 additions & 1 deletion src/execution/__tests__/resolve-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @noflow
* @flow strict
*/

import { expect } from 'chai';
Expand Down Expand Up @@ -70,6 +70,8 @@ describe('Execute: resolve function', () => {
});

class Adder {
_num: number;

constructor(num) {
this._num = num;
}
Expand Down
12 changes: 11 additions & 1 deletion src/execution/__tests__/union-interface-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @noflow
* @flow strict
*/

import { expect } from 'chai';
Expand All @@ -23,20 +23,30 @@ import {
} from '../../type';

class Dog {
name: string;
barks: boolean;

constructor(name, barks) {
this.name = name;
this.barks = barks;
}
}

class Cat {
name: string;
meows: boolean;

constructor(name, meows) {
this.name = name;
this.meows = meows;
}
}

class Person {
name: string;
pets: ?Array<Dog | Cat>;
friends: ?Array<Dog | Cat | Person>;

constructor(name, pets, friends) {
this.name = name;
this.pets = pets;
Expand Down
4 changes: 2 additions & 2 deletions src/execution/__tests__/variables-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @noflow
* @flow strict
*/

import inspect from '../../jsutils/inspect';
Expand Down Expand Up @@ -702,7 +702,7 @@ describe('Execute: Handles inputs', () => {
],
});

expect(result.errors[0].originalError).not.to.equal(undefined);
expect(result).to.have.nested.property('errors[0].originalError');
});

it('reports error for non-provided variables for non-nullable inputs', () => {
Expand Down