Skip to content

Commit

Permalink
looks like there is whitespace on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
tlhunter committed May 15, 2024
1 parent 96c613b commit 38135fa
Showing 1 changed file with 6 additions and 25 deletions.
31 changes: 6 additions & 25 deletions packages/dd-trace/test/check_require_cache.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,38 +14,19 @@ describe('check_require_cache', () => {

it('should be no warnings when tracer is loaded first', (done) => {
exec(`${process.execPath} ./check_require_cache/good-order.js`, opts, (error, stdout, stderr) => {
if (error) {
return done(error)
}

if (stdout) {
return done(stdout)
}

if (stderr) {
return done(stderr)
}

expect(error).to.be.null
expect(stdout).to.be.empty
expect(stderr).to.be.empty
done()
})
})

it('should find warnings when tracer loaded late', (done) => {
exec(`${process.execPath} ./check_require_cache/bad-order.js`, opts, (error, stdout, stderr) => {
if (error) {
return done(error)
}

if (stdout) {
return done(stdout)
}

if (!stderr) {
return done('expected an error string')
}

expect(error).to.be.null
expect(stdout).to.be.empty
expect(stderr).to.not.be.empty
expect(stderr).to.include("Package 'express' was loaded")

done()
})
})
Expand Down

0 comments on commit 38135fa

Please sign in to comment.