Skip to content

Commit

Permalink
fix new test
Browse files Browse the repository at this point in the history
  • Loading branch information
rochdev committed Jun 24, 2024
1 parent 5238886 commit de7a5ce
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/datadog-plugin-express/test/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1279,7 +1279,9 @@ describe('Plugin', () => {
res.status(200).send('hi')
})

getPort().then(port => {
appListener = app.listen(0, 'localhost', () => {
const port = appListener.address().port

agent.use(traces => {
const spans = sort(traces[0])

Expand All @@ -1292,13 +1294,11 @@ describe('Plugin', () => {
done()
})

appListener = app.listen(port, 'localhost', () => {
axios
.get(`http://localhost:${port}/does-not-exist`, {
validateStatus: status => status === 404
})
.catch(done)
})
axios
.get(`http://localhost:${port}/does-not-exist`, {
validateStatus: status => status === 404
})
.catch(done)
})
})

Expand Down

0 comments on commit de7a5ce

Please sign in to comment.