| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 05d6227 commit ff7b144
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,14 +1,18 @@ | |||
| 1 | 1 | 'use strict'; | |
| 2 | - const common = require('../common'); | ||
| 3 | - const fs = require('fs'); | ||
| 4 | - const net = require('net'); | ||
| 5 | 2 | ||
| 3 | + const { PIPE, mustCall } = require('../common'); | ||
| 6 | 4 | const tmpdir = require('../common/tmpdir'); | |
| 7 | - tmpdir.refresh(); | ||
| 5 | + const { test } = require('node:test'); | ||
| 6 | + const fs = require('node:fs'); | ||
| 7 | + const net = require('node:net'); | ||
| 8 | 8 | ||
| 9 | - const server = net.createServer().listen(common.PIPE, common.mustCall(() => { | ||
| 10 | - // The process should not crash | ||
| 11 | - // See https://github.com/nodejs/node/issues/52159 | ||
| 12 | - fs.readdirSync(tmpdir.path, { recursive: true }); | ||
| 13 | - server.close(); | ||
| 14 | - })); | ||
| 9 | + test('readdir should not recurse into Unix domain sockets', (t, done) => { | ||
| 10 | + tmpdir.refresh(); | ||
| 11 | + const server = net.createServer().listen(PIPE, mustCall(() => { | ||
| 12 | + // The process should not crash | ||
| 13 | + // See https://github.com/nodejs/node/issues/52159 | ||
| 14 | + fs.readdirSync(tmpdir.path, { recursive: true }); | ||
| 15 | + server.close(); | ||
| 16 | + done(); | ||
| 17 | + })); | ||
| 18 | + }); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments