Skip to content

Commit 7f5f655

Browse files
committed
started to layout the test structure for buildTypeWeight function
1 parent 7973e37 commit 7f5f655

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

src/analysis/buildTypeWeights.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { GraphQLSchemaConfig } from 'graphql/type/schema';
1+
import { GraphQLSchema } from 'graphql/type/schema';
22

33
interface Fields {
44
[index: string]: number;
@@ -13,7 +13,7 @@ interface TypeWeightObject {
1313
[index: string]: Type;
1414
}
1515

16-
function buildTypeWeightsFromSchema(schema: GraphQLSchemaConfig): TypeWeightObject {
16+
function buildTypeWeightsFromSchema(schema: GraphQLSchema): TypeWeightObject {
1717
throw Error(`getTypeWeightsFromSchema is not implemented.`);
1818
}
1919
export default buildTypeWeightsFromSchema;
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,13 @@
1+
import { buildSchema } from 'graphql';
2+
import { GraphQLSchema } from 'graphql/type/schema';
13
import buildTypeWeightsFromSchema from '../../src/analysis/buildTypeWeights';
4+
5+
describe('Test buildTypeWeightsFromSchema function', () => {
6+
beforeEach(() => {
7+
let schema: GraphQLSchema;
8+
});
9+
10+
test('creates the type weight object from graphql schema object', () => {});
11+
12+
test('');
13+
});

0 commit comments

Comments
 (0)