Skip to content

Commit

Permalink
Improve server started detection
Browse files Browse the repository at this point in the history
  • Loading branch information
uurien committed Jun 18, 2024
1 parent 75d8081 commit 74ac253
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/datadog-plugin-next/test/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ describe('Plugin', function () {
server.once('error', done)

function waitUntilServerStarted (chunk) {
if (chunk.toString().includes(`port: ${port}`)) {
const chunkString = chunk.toString()
if (chunkString?.includes(port) || chunkString?.includes('Ready ')) {
server.stdout.off('data', waitUntilServerStarted)
done()
}
Expand Down

0 comments on commit 74ac253

Please sign in to comment.