Skip to content

Commit

Permalink
nx-update-ts-references: Skip extra check during CI
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobLey committed Dec 8, 2024
1 parent b01a704 commit 15c13a7
Showing 1 changed file with 20 additions and 13 deletions.
33 changes: 20 additions & 13 deletions apps/nx-update-ts-references/src/tests/integration/cli.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,27 @@ suite('cli', () => {
const result = await execAsync(`./bin.mjs --project-root ${projectRoot} --ci`);

expect(result.stdout).to.contain('');
// https://github.com/nrwl/nx/issues/29244
expect(result.stderr).to.contain(
'The inspector is disabled, coverage could not be collected'
);
const stdErrWithoutWarning = result.stderr
.replace(
/\(node:\d+\) Warning: The inspector is disabled, coverage could not be collected\n/u,
''
)
.replace(
/\(Use `pnpm --trace-warnings ...` to show where the warning was created\)\n/u,
''
// https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#default-environment-variables
// eslint-disable-next-line n/no-process-env
if (process.env.GITHUB_ACTIONS === 'true') {
// Github Actions installs pnpm with a version of node that includes inspector.
expect(result.stderr).to.equal('');
} else {
// https://github.com/nrwl/nx/issues/29244
expect(result.stderr).to.contain(
'The inspector is disabled, coverage could not be collected'
);
expect(stdErrWithoutWarning).to.equal('');
const stdErrWithoutWarning = result.stderr
.replace(
/\(node:\d+\) Warning: The inspector is disabled, coverage could not be collected\n/u,
''
)
.replace(
/\(Use `pnpm --trace-warnings ...` to show where the warning was created\)\n/u,
''
);
expect(stdErrWithoutWarning).to.equal('');
}
});

test('unknown options', async () => {
Expand Down

0 comments on commit 15c13a7

Please sign in to comment.