diff --git a/src/agent/debuglet.ts b/src/agent/debuglet.ts index b899aa185..2999f8f65 100644 --- a/src/agent/debuglet.ts +++ b/src/agent/debuglet.ts @@ -213,6 +213,7 @@ export class Debuglet extends EventEmitter { 'traces. The above warning will not affect the debug agent.'); } }); + const that = this; const stat = promisify(fs.stat); diff --git a/test/test-debuglet.ts b/test/test-debuglet.ts index cec72ce6c..9a4c5585d 100644 --- a/test/test-debuglet.ts +++ b/test/test-debuglet.ts @@ -337,12 +337,16 @@ describe('Debuglet', function() { assert.equal((debuglet.debuggee_ as Debuggee).project, projectId); console.log = oldLog; const arch = process.arch; - if (arch === 'ia32' || arch === 'x86') { - assert(logText.includes('The current debug agent does not use ' - + 'Inspector async stack traces')); + console.log(process); + if (parseFloat(process.version) > 8 && + (arch === 'ia32' || arch === 'x86')) { + assert(logText.includes( + 'The current debug agent does not use ' + + 'Inspector async stack traces')); } else { - assert(!logText.includes('The current debug agent does not use ' - + 'Inspector async stack traces')); + assert(!logText.includes( + 'The current debug agent does not use ' + + 'Inspector async stack traces')); } debuglet.stop(); scope.done();