diff options
author | Bert Belder <bertbelder@gmail.com> | 2020-04-29 22:00:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-29 16:00:31 -0400 |
commit | 3e6ea6284178df0be4982d9775f47b47b14c6139 (patch) | |
tree | ed684ea536e32023e72004110556ad8285126676 /std/fs/expand_glob_test.ts | |
parent | 721a4ad59d4a8bdd8470d6b98839137f14c84ba9 (diff) |
BREAKING: Include limited metadata in 'DirEntry' objects (#4941)
This change is to prevent needed a separate stat syscall for each file
when using readdir.
For consistency, this PR also modifies std's `WalkEntry` interface to
extend `DirEntry` with an additional `path` field.
Diffstat (limited to 'std/fs/expand_glob_test.ts')
-rw-r--r-- | std/fs/expand_glob_test.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/std/fs/expand_glob_test.ts b/std/fs/expand_glob_test.ts index a2e6b4333..98abe0d73 100644 --- a/std/fs/expand_glob_test.ts +++ b/std/fs/expand_glob_test.ts @@ -19,12 +19,12 @@ async function expandGlobArray( options: ExpandGlobOptions ): Promise<string[]> { const paths: string[] = []; - for await (const { filename } of expandGlob(globString, options)) { - paths.push(filename); + for await (const { path } of expandGlob(globString, options)) { + paths.push(path); } paths.sort(); const pathsSync = [...expandGlobSync(globString, options)].map( - ({ filename }): string => filename + ({ path }): string => path ); pathsSync.sort(); assertEquals(paths, pathsSync); |