Skip to content

Commit

Permalink
fix model directive tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sundersc committed Aug 23, 2023
1 parent 5214037 commit d9d245a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/amplify-graphql-model-transformer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
"collectCoverage": true,
"coverageThreshold": {
"global": {
"branches": 61,
"functions": 74,
"branches": 58,
"functions": 73,
"lines": 80
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ describe('ModelTransformer: ', () => {
title: String!
}
`;
const transformer = new GraphQLTransform({
const out = testTransform({
schema: validSchema,
transformers: [new ModelTransformer()],
});
const out = transformer.transform(validSchema);
expect(out).toBeDefined();

validateModelSchema(parse(out.schema));
Expand Down Expand Up @@ -1552,15 +1552,14 @@ describe('ModelTransformer: ', () => {
}
`;

const transformer = new GraphQLTransform({
transformers: [new ModelTransformer()],
});
const modelToDatasourceMap = new Map<string, DatasourceType>();
modelToDatasourceMap.set('Note', {
dbType: 'MySQL',
provisionDB: false,
});
const out = transformer.transform(validSchema, {
const out = testTransform({
schema: validSchema,
transformers: [new ModelTransformer()],
modelToDatasourceMap,
});
expect(out).toBeDefined();
Expand Down

0 comments on commit d9d245a

Please sign in to comment.