1'use strict'; 2const common = require('../common'); 3const fs = require('fs'); 4 5if (!common.isOSX) { 6 common.skip('this tests works only on MacOS'); 7} 8 9const assert = require('assert'); 10 11fs.readdir( 12 Buffer.from('/dev'), 13 { withFileTypes: true, encoding: 'buffer' }, 14 common.mustCall((e, d) => { 15 assert.strictEqual(e, null); 16 }) 17); 18