Skip to content

Commit

Permalink
fix(hoist-field): use new import fn in unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
ntziolis committed Nov 20, 2021
1 parent 8c47d4b commit d4bf5fb
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions packages/transforms/hoist-field/test/wrapHoistField.spec.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import InMemoryLRUCache from '@graphql-mesh/cache-inmemory-lru';
import { MeshPubSub } from '@graphql-mesh/types';
import { ImportFn, MeshPubSub } from '@graphql-mesh/types';
import { wrapSchema } from '@graphql-tools/wrap';
import { buildSchema, GraphQLField, GraphQLObjectType, printSchema } from 'graphql';
import { PubSub } from 'graphql-subscriptions';

import WrapHoistField from '../src/wrapHoistField';

describe('hoist', () => {
const importFn: ImportFn = m => import(m);
const schema = buildSchema(/* GraphQL */ `
type Query {
users(limit: Int!, page: Int): UserSearchResult
Expand Down Expand Up @@ -36,8 +37,6 @@ describe('hoist', () => {
schema,
transforms: [
new WrapHoistField({
apiName: '',
syncImportFn: require,
config: {
mode: 'wrap',
fields: [
Expand All @@ -48,9 +47,11 @@ describe('hoist', () => {
},
],
},
apiName: '',
cache,
pubsub,
baseDir,
importFn,
}),
],
});
Expand All @@ -69,8 +70,6 @@ describe('hoist', () => {
schema,
transforms: [
new WrapHoistField({
apiName: '',
syncImportFn: require,
config: {
mode: 'wrap',
fields: [
Expand All @@ -87,9 +86,11 @@ describe('hoist', () => {
},
],
},
apiName: '',
cache,
pubsub,
baseDir,
importFn,
}),
],
});
Expand All @@ -108,8 +109,6 @@ describe('hoist', () => {
schema,
transforms: [
new WrapHoistField({
apiName: '',
syncImportFn: require,
config: {
mode: 'wrap',
fields: [
Expand All @@ -121,9 +120,11 @@ describe('hoist', () => {
},
],
},
apiName: '',
cache,
pubsub,
baseDir,
importFn,
}),
],
});
Expand All @@ -145,8 +146,6 @@ describe('hoist', () => {
schema,
transforms: [
new WrapHoistField({
apiName: '',
syncImportFn: require,
config: {
mode: 'wrap',
fields: [
Expand All @@ -163,9 +162,11 @@ describe('hoist', () => {
},
],
},
apiName: '',
cache,
pubsub,
baseDir,
importFn,
}),
],
});
Expand All @@ -188,8 +189,6 @@ describe('hoist', () => {
schema,
transforms: [
new WrapHoistField({
apiName: '',
syncImportFn: require,
config: {
mode: 'wrap',
fields: [
Expand All @@ -207,9 +206,11 @@ describe('hoist', () => {
},
],
},
apiName: '',
cache,
pubsub,
baseDir,
importFn,
}),
],
});
Expand Down

0 comments on commit d4bf5fb

Please sign in to comment.