Skip to content

Commit 1eba0c3

Browse files
chore: fixes smoke tests (#14670)
* chore: remove outdated node version from smoke test * fix: node 22 compatibility for process.exit and nexpect error logging * fix: detect windows test * fix: change node version to node 20 * fix: remove process.env * fix: crypto flag for node 18 * chore: mid work * chore: mid work * chore: mid work
1 parent 6b0f025 commit 1eba0c3

4 files changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/smoke-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ on:
1818
default: '["rc", "latest"]'
1919

2020
env:
21-
NODE_OPTIONS: --max-old-space-size=8096
21+
NODE_OPTIONS: --max-old-space-size=8096 --experimental-global-webcrypto
2222
IS_AMPLIFY_CLI_SMOKE_TEST_RUN: true
2323

2424
jobs:

packages/amplify-app/src/call-amplify.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ const callPkgAmplifyNix = async (args, opts) => {
3636
const callNodeAmplify = async (args, opts) => {
3737
opts = { ...defaultOpts, ...opts };
3838
const amplifyCmd = path.basename(process.argv[1]) === 'amplify-app-dev' ? amplifyDev : amplify;
39-
const { stdout, stderr } = await execa(amplifyCmd, args, { stdio: opts.inheritIO ? 'inherit' : undefined });
39+
const { stdout, stderr } = await execa(amplifyCmd, args, {
40+
stdio: opts.inheritIO ? 'inherit' : undefined,
41+
shell: isWin ? true : undefined,
42+
});
4043
if (stderr) {
4144
throw new Error(`Amplify failed due to ${stderr}`);
4245
}

packages/amplify-app/src/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,6 @@ async function createJSHelperFiles() {
355355
return new Promise((resolve, reject) => {
356356
const npmInstall = spawn(npm, ['install', '--only=dev'], {
357357
cwd: process.cwd(),
358-
env: process.env,
359358
stdio: 'inherit',
360359
shell: isWin ? true : undefined,
361360
});

packages/amplify-e2e-core/src/cli-test-runner.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const run = async (globalConfig, config, environment, runtime, testPath)
1818
// Exiting here as a workaround, only on windows.
1919
// A timeout is used to give Jest time to render the list of passed/failed tests.
2020
// See https://github.com/microsoft/node-pty/issues/437
21-
process.exit(result.numFailingTests !== 0);
21+
process.exit(result.numFailingTests !== 0 ? 1 : 0);
2222
}
2323
}, 1000);
2424
result.CLITestRunner = CLITestRunner;

0 commit comments

Comments
 (0)