Skip to content

Commit 252b150

Browse files
author
Vieltojarvi
committed
e2e tests did not like readFile, using import
1 parent 8ef43dc commit 252b150

File tree

1 file changed

+3
-6
lines changed
  • packages/integration-tests/src/test-projects/seed-test-project/amplify/seed

1 file changed

+3
-6
lines changed

packages/integration-tests/src/test-projects/seed-test-project/amplify/seed/seed.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,10 @@ import * as auth from 'aws-amplify/auth';
33
import type { Schema } from './../data/resource.js';
44
import { Amplify } from 'aws-amplify';
55
import { generateClient } from 'aws-amplify/api';
6+
// @ts-expect-error this file will not exist until sandbox is created
7+
import outputs from '../../amplify_outputs.json';
68
import { SemVer } from 'semver';
79
import crypto from 'node:crypto';
8-
import { readFile } from 'node:fs/promises';
9-
10-
const outputFile = JSON.parse(
11-
await readFile('../../amplify_outputs.json', { encoding: 'utf8' }),
12-
);
1310

1411
// TODO: this is a work around - in theory this should be fixed
1512
// it seems like as of amplify v6 , some of the code only runs in the browser ...
@@ -22,7 +19,7 @@ if (process.versions.node) {
2219
}
2320
}
2421

25-
Amplify.configure(outputFile);
22+
Amplify.configure(outputs);
2623

2724
const dataClient = generateClient<Schema>();
2825

0 commit comments

Comments
 (0)