From c8154081b128bb0e9833e75c3f05a0eb5e4155fa Mon Sep 17 00:00:00 2001 From: Klaus Meinhardt Date: Thu, 13 Sep 2018 09:34:13 +0200 Subject: [PATCH] tests --- types/glob/glob-tests.ts | 5 ++++- types/glob/index.d.ts | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/types/glob/glob-tests.ts b/types/glob/glob-tests.ts index e0f612e682..e67e41317b 100644 --- a/types/glob/glob-tests.ts +++ b/types/glob/glob-tests.ts @@ -5,7 +5,7 @@ const Glob = glob.Glob; const pattern = "test/a/**/[cg]/../[cg]"; console.log(pattern); - const mg = new Glob(pattern, {mark: true, sync: true}, (er, matches) => { + const mg = new Glob(pattern, {mark: true, sync: true, symlinks: {"test/a/foo": true}}, (er, matches) => { if (er) { console.error(er); return; @@ -28,3 +28,6 @@ const Glob = glob.Glob; }); console.log("after"); })(); + +glob.sync('/foo/*', {realpath: true, realpathCache: {'/foo/bar': '/bar'}, ignore: '/foo/baz'}); +glob.sync('/*', {nodir: true, cache: {'/': ['bar', 'baz']}, statCache: {'/foo/bar': false, '/foo/baz': {isDirectory() { return true; }}}}); diff --git a/types/glob/index.d.ts b/types/glob/index.d.ts index ada6c99414..9b0e1e5cb8 100644 --- a/types/glob/index.d.ts +++ b/types/glob/index.d.ts @@ -47,7 +47,7 @@ declare namespace G { nocase?: boolean; matchBase?: any; nodir?: boolean; - ignore?: string | string[] + ignore?: string | string[]; follow?: boolean; realpath?: boolean; nonegate?: boolean;