Skip to content

Commit

Permalink
remove this commit after graphql#3039 is merged
Browse files Browse the repository at this point in the history
  • Loading branch information
saihaj committed Apr 14, 2021
1 parent 5fb4bb1 commit 3b7f1f5
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions src/type/__tests__/predicate-test.ts
@@ -1,7 +1,11 @@
import { expect } from 'chai';
import { describe, it } from 'mocha';

import type { GraphQLArgument, GraphQLInputField } from '../definition';
import type {
GraphQLArgument,
GraphQLInputField,
GraphQLInputType,
} from '../definition';
import {
GraphQLDirective,
GraphQLSkipDirective,
Expand Down Expand Up @@ -503,7 +507,7 @@ describe('Type predicates', () => {

describe('getNullableType', () => {
it('returns undefined for no type', () => {
expect(getNullableType()).to.equal(undefined);
expect(getNullableType(undefined)).to.equal(undefined);
expect(getNullableType(null)).to.equal(undefined);
});

Expand Down Expand Up @@ -536,7 +540,7 @@ describe('Type predicates', () => {

describe('getNamedType', () => {
it('returns undefined for no type', () => {
expect(getNamedType()).to.equal(undefined);
expect(getNamedType(undefined)).to.equal(undefined);
expect(getNamedType(null)).to.equal(undefined);
});

Expand All @@ -559,15 +563,18 @@ describe('Type predicates', () => {
});

describe('isRequiredArgument', () => {
function buildArg(config: Partial<GraphQLArgument>): GraphQLArgument {
function buildArg(config: {
type: GraphQLInputType;
defaultValue?: unknown;
}): GraphQLArgument {
return {
name: 'someArg',
type: config.type,
description: undefined,
defaultValue: undefined,
defaultValue: config.defaultValue,
deprecationReason: null,
extensions: undefined,
astNode: undefined,
...config,
};
}

Expand Down Expand Up @@ -604,17 +611,18 @@ describe('Type predicates', () => {
});

describe('isRequiredInputField', () => {
function buildInputField(
config: Partial<GraphQLInputField>,
): GraphQLInputField {
function buildInputField(config: {
type: GraphQLInputType;
defaultValue?: unknown;
}): GraphQLInputField {
return {
name: 'someInputField',
type: config.type,
description: undefined,
defaultValue: undefined,
defaultValue: config.defaultValue,
deprecationReason: null,
extensions: undefined,
astNode: undefined,
...config,
};
}

Expand Down

0 comments on commit 3b7f1f5

Please sign in to comment.