Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix flaky debug test #2613

Merged
merged 5 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: isolate test
  • Loading branch information
metcoder95 committed Jan 14, 2024
commit dcff4551e22eb5f2c7f7799acc6c7b089be911e5
3 changes: 2 additions & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ jobs:
uses: pkgjs/action/.github/workflows/node-test.yaml@v0.1
with:
runs-on: ubuntu-latest, windows-latest
test-command: npm run coverage:ci
# test-command: npm run coverage:ci
test-command: npm run test:node-test
timeout-minutes: 15
post-test-steps: |
- name: Coverage Report
Expand Down
12 changes: 6 additions & 6 deletions test/fixtures/websocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ const server = new WebSocketServer({ port: 0 })
server.on('connection', ws => {
ws.close(1000, 'goodbye')
})
server.on('listening', () => {
const { port } = server.address()
const ws = new WebSocket(`ws://localhost:${port}`, 'chat')

const { port } = server.address()

const ws = new WebSocket(`ws://localhost:${port}`, 'chat')

ws.addEventListener('close', () => {
server.close()
ws.addEventListener('close', () => {
server.close()
})
})
Loading