Skip to content

Commit

Permalink
test: add codegen to ts build app test
Browse files Browse the repository at this point in the history
  • Loading branch information
dpilch committed Nov 17, 2023
1 parent f3d6847 commit 0cb877c
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import {
generateStatementsAndTypes,
craInstall,
craBuild,
addCodegen,
AmplifyFrontend,
} from '@aws-amplify/amplify-codegen-e2e-core';
const { schemas } = require('@aws-amplify/graphql-schema-test-library');
import { existsSync, writeFileSync, readdirSync, rmSync } from 'fs';
Expand All @@ -22,6 +24,9 @@ describe('build app - JS', () => {
beforeAll(async () => {
await initProjectWithProfile(projectRoot, { ...config });
await addApiWithBlankSchemaAndConflictDetection(projectRoot);
await addCodegen(projectRoot, {
frontendType: AmplifyFrontend.javascript,
});
await craInstall(projectRoot, { ...config });
apiName = readdirSync(path.join(projectRoot, 'amplify', 'backend', 'api'))[0];
});
Expand Down

0 comments on commit 0cb877c

Please sign in to comment.