diff options
author | Nayeem Rahman <muhammed.9939@gmail.com> | 2020-02-06 22:25:39 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-06 17:25:39 -0500 |
commit | 971391dbaf8f5273eb2f16edd22b0c6cf694be46 (patch) | |
tree | 901a658522b9080221bb931c1504361c90ec8d18 /std/path/glob_test.ts | |
parent | 699d10bd9e5f19ad2f4ffb82225c86690a092c07 (diff) |
fix(std/path/globrex.ts): Use non-capturing groups in globrex() (#3898)
Diffstat (limited to 'std/path/glob_test.ts')
-rw-r--r-- | std/path/glob_test.ts | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/std/path/glob_test.ts b/std/path/glob_test.ts index 6cacd2eeb..7f67ca219 100644 --- a/std/path/glob_test.ts +++ b/std/path/glob_test.ts @@ -49,25 +49,15 @@ test({ testWalk( async (d: string): Promise<void> => { await mkdir(d + "/a"); - await touch(d + "/a/x.ts"); - }, - async function globInWalk(): Promise<void> { - const arr = await walkArray(".", { match: [globToRegExp("*.ts")] }); - assertEquals(arr.length, 1); - assertEquals(arr[0], "a/x.ts"); - } -); - -testWalk( - async (d: string): Promise<void> => { - await mkdir(d + "/a"); await mkdir(d + "/b"); await touch(d + "/a/x.ts"); await touch(d + "/b/z.ts"); await touch(d + "/b/z.js"); }, - async function globInWalkWildcardFiles(): Promise<void> { - const arr = await walkArray(".", { match: [globToRegExp("*.ts")] }); + async function globInWalkWildcard(): Promise<void> { + const arr = await walkArray(".", { + match: [globToRegExp(join("*", "*.ts"))] + }); assertEquals(arr.length, 2); assertEquals(arr[0], "a/x.ts"); assertEquals(arr[1], "b/z.ts"); |