Skip to content

Commit

Permalink
theory is that stdout.includes("name: 'GET'") breaks because ANSI c…
Browse files Browse the repository at this point in the history
…olor codes with node 18
  • Loading branch information
trentm committed Nov 3, 2023
1 parent 40ef62e commit 5732850
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions metapackages/auto-instrumentations-node/test/register.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,27 @@ import { spawnSync } from 'child_process';
import * as assert from 'assert';

describe('Register', function () {
this.timeout(5000);
it('can load auto instrumentation from command line', async () => {
console.log('XXX env.TERM=%s', process.env.TERM)
const proc = spawnSync(
process.execPath,
['--require', '../build/src/register.js', './test-app/app.js'],
{
cwd: __dirname,
timeout: 5000,
killSignal: 'SIGKILL', // SIGTERM is not sufficient to terminate some hangs
env: Object.assign(
{},
process.env,
{
OTEL_NODE_RESOURCE_DETECTORS: 'none',
OTEL_TRACES_EXPORTER: 'console',
NODE_DISABLE_COLORS: '1'
}
)
}
);
console.log('XXX proc: status=%s stdout=--\n%s\n-- stderr=--\n%s\n--', proc.status, proc.stdout, proc.stderr);
console.log('XXX proc: status=%s signal=%s stdout=--\n%s\n-- stderr=--\n%s\n--', proc.status, proc.signal, proc.stdout, proc.stderr);
assert.ifError(proc.error);
assert.ok(
proc.stdout.includes(
Expand Down

0 comments on commit 5732850

Please sign in to comment.