Skip to content

Commit

Permalink
fixup! fs: pass correct path to DirentFromStats during glob
Browse files Browse the repository at this point in the history
  • Loading branch information
avivkeller committed Sep 22, 2024
1 parent 375f877 commit 03259b8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/parallel/test-fs-glob.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as common from '../common/index.mjs';
import tmpdir from '../common/tmpdir.js';
import { resolve, dirname, sep, basename, relative, join, isAbsolute } from 'node:path';
import { resolve, dirname, sep, relative, join, isAbsolute } from 'node:path';
import { mkdir, writeFile, symlink, glob as asyncGlob } from 'node:fs/promises';
import { glob, globSync, Dirent } from 'node:fs';
import { test, describe } from 'node:test';
Expand Down Expand Up @@ -350,7 +350,7 @@ describe('glob - withFileTypes', function() {
assertDirents(actual);
assert.deepStrictEqual(
actual.map((dirent) => relative(fixtureDir, join(dirent.parentPath, dirent.name))).sort(),
expected.map(path => isAbsolute(path) ? relative(fixtureDir, path) : path).sort()
expected.map((path) => (isAbsolute(path) ? relative(fixtureDir, path) : path)).sort()
);
});
}
Expand All @@ -367,7 +367,7 @@ describe('globSync - withFileTypes', function() {
assertDirents(actual);
assert.deepStrictEqual(
actual.map((dirent) => relative(fixtureDir, join(dirent.parentPath, dirent.name))).sort(),
expected.map(path => isAbsolute(path) ? relative(fixtureDir, path) : path).sort()
expected.map((path) => (isAbsolute(path) ? relative(fixtureDir, path) : path)).sort()
);
});
}
Expand All @@ -385,7 +385,7 @@ describe('fsPromises glob - withFileTypes', function() {
assertDirents(actual);
assert.deepStrictEqual(
actual.map((dirent) => relative(fixtureDir, join(dirent.parentPath, dirent.name))).sort(),
expected.map(path => isAbsolute(path) ? relative(fixtureDir, path) : path).sort()
expected.map((path) => (isAbsolute(path) ? relative(fixtureDir, path) : path)).sort()
);
});
}
Expand Down

0 comments on commit 03259b8

Please sign in to comment.