Skip to content

Commit

Permalink
test: verify win named pipe enumeration
Browse files Browse the repository at this point in the history
Add a test to verify named pipe enumeration in windows works.
  • Loading branch information
Flarna committed Nov 29, 2024
1 parent 7ca7526 commit ccd6228
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/parallel/test-fs-readdir-pipe.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
'use strict';

const common = require('../common');
const assert = require('assert');
const { readdir, readdirSync } = require('fs');

if (!common.isWindows) {
common.skip('This test is specific to Windows to test enumerate pipes');
}

// Ref: https://github.com/nodejs/node/issues/56002
// This test is specific to Windows.

const pipe = '\\\\.\\pipe';

assert.ok(readdirSync(pipe).length >= 0);

readdir(pipe, common.mustCall((err, files) => {
assert.ok(err == null);
assert.ok(files.length >= 0);
}));

0 comments on commit ccd6228

Please sign in to comment.