Skip to content

Commit 31b9bfa

Browse files
committed
Add negatedExtglob field tests
1 parent 210454c commit 31b9bfa

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

types/picomatch/picomatch-tests.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ pm.isMatch("a.a", "b.*");
3232
pm.parse("pattern");
3333
pm.parse("pattern", {});
3434

35-
pm.scan("!./foo/*.js");
35+
// $ExpectType State
36+
const scanState = pm.scan("!./foo/*.js");
37+
// $ExpectType boolean
38+
scanState.negatedExtglob;
3639

3740
const state = pm.parse("*.js");
3841
pm.compileRe(state);
@@ -43,7 +46,10 @@ pm.toRegex(state.output, {
4346
nocase: true,
4447
});
4548

46-
pm.scan("!./foo/*.js", { tokens: true });
49+
// $ExpectType State
50+
const scanStateWithTokens = pm.scan("!./foo/*.js", { tokens: true });
51+
// $ExpectType boolean
52+
scanStateWithTokens.negatedExtglob;
4753

4854
pm.makeRe("foo/*.js").test("foo/bar.js");
4955
pm.makeRe("foo/{01..25}/bar", {

0 commit comments

Comments
 (0)