Skip to content

Commit 3aeb0a4

Browse files
committed
fix: process showdown
1 parent 7dbd5bb commit 3aeb0a4

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

playground/node/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const server = createServer((req, res) => {
66

77
res.writeHead(200)
88
res.end(`detect accpect-language: ${languages}`)
9+
process.exit()
910
})
1011

1112
server.listen(8123)

playground/node/node.test.mjs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ test('node integration test', async () => {
1717
const res = await fetch(req)
1818
await sleep(1000)
1919

20+
console.log(child.pid)
21+
22+
const cleanup = () => {
23+
process.kill(child.pid)
24+
}
25+
26+
process.on('SIGINT', cleanup)
27+
process.on('SIGTERM', cleanup)
28+
process.on('SIGQUIT', cleanup)
29+
2030
assert.deepEqual('detect accpect-language: en-US,en,ja', await res.text())
21-
child.kill('SIGINT')
2231
})

0 commit comments

Comments
 (0)