Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
80713 views
1
var Glob = require("../glob.js").Glob
2
var test = require('tap').test
3
4
test('globstar should not have dupe matches', function(t) {
5
var pattern = 'a/**/[gh]'
6
var g = new Glob(pattern, { cwd: __dirname })
7
var matches = []
8
g.on('match', function(m) {
9
console.error('match %j', m)
10
matches.push(m)
11
})
12
g.on('end', function(set) {
13
console.error('set', set)
14
matches = matches.sort()
15
set = set.sort()
16
t.same(matches, set, 'should have same set of matches')
17
t.end()
18
})
19
})
20
21