Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
RedYetiDev committed Jul 12, 2024
1 parent f0d0ec6 commit 8a60fff
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions test/parallel/test-fs-glob.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,11 @@ describe('glob - withFileTypes', function() {
const promisified = promisify(glob);
for (const [pattern, expected] of Object.entries(patterns)) {
test(pattern, async () => {
const actual = await promisified(pattern, { cwd: fixtureDir, withFileTypes: true, exclude: (dirent) => assert.ok(dirent instanceof Dirent) });
const actual = await promisified(pattern, {
cwd: fixtureDir,
withFileTypes: true,
exclude: (dirent) => assert.ok(dirent instanceof Dirent)
});
assertDirents(actual);
const normalized = expected.filter(Boolean).map((item) => basename(item)).sort();
assert.deepStrictEqual(actual.map((dirent) => dirent.name).sort(), normalized.sort());
Expand All @@ -353,7 +357,11 @@ describe('glob - withFileTypes', function() {
describe('globSync - withFileTypes', function() {
for (const [pattern, expected] of Object.entries(patterns)) {
test(pattern, () => {
const actual = globSync(pattern, { cwd: fixtureDir, withFileTypes: true, exclude: (dirent) => assert.ok(dirent instanceof Dirent) });
const actual = globSync(pattern, {
cwd: fixtureDir,
withFileTypes: true,
exclude: (dirent) => assert.ok(dirent instanceof Dirent)
});
assertDirents(actual);
const normalized = expected.filter(Boolean).map((item) => basename(item)).sort();
assert.deepStrictEqual(actual.map((dirent) => dirent.name).sort(), normalized.sort());
Expand All @@ -365,7 +373,11 @@ describe('fsPromises glob - withFileTypes', function() {
for (const [pattern, expected] of Object.entries(patterns)) {
test(pattern, async () => {
const actual = [];
for await (const item of asyncGlob(pattern, { cwd: fixtureDir, withFileTypes: true, exclude: (dirent) => assert.ok(dirent instanceof Dirent) })) actual.push(item);
for await (const item of asyncGlob(pattern, {
cwd: fixtureDir,
withFileTypes: true,
exclude: (dirent) => assert.ok(dirent instanceof Dirent)
})) actual.push(item);
assertDirents(actual);
const normalized = expected.filter(Boolean).map((item) => basename(item)).sort();
assert.deepStrictEqual(actual.map((dirent) => dirent.name).sort(), normalized.sort());
Expand Down

0 comments on commit 8a60fff

Please sign in to comment.