GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: convert readdir test to use test runner · nodejs/node@ff7b144

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-fs-readdir-recursive.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-fs-readdir-recursive.js‎

Copy file name to clipboard
+14-10Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
'use strict';
2-
const common = require('../common');
3-
const fs = require('fs');
4-
const net = require('net');
52

3+
const { PIPE, mustCall } = require('../common');
64
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');
88

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+
});

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.