Sha256: bfb48dfbf448d82e082632959af1683bc753d90b8f7ab0120401de9658574f3c

Contents?: true

Size: 759 Bytes

Versions: 92

Compression:

Stored size: 759 Bytes

Contents

var glob = require('../')
var test = require('tap').test
var path = require('path')

test('stat all the things', function(t) {
  var g = new glob.Glob('a/*abc*/**', { stat: true, cwd: __dirname })
  var matches = []
  g.on('match', function(m) {
    matches.push(m)
  })
  var stats = []
  g.on('stat', function(m) {
    stats.push(m)
  })
  g.on('end', function(eof) {
    stats = stats.sort()
    matches = matches.sort()
    eof = eof.sort()
    t.same(stats, matches)
    t.same(eof, matches)
    var cache = Object.keys(this.statCache)
    t.same(cache.map(function (f) {
      return path.relative(__dirname, f)
    }).sort(), matches)

    cache.forEach(function(c) {
      t.equal(typeof this.statCache[c], 'object')
    }, this)

    t.end()
  })
})

Version data entries

92 entries across 70 versions & 8 rubygems

Version Path
ela-4.1.6 node_modules/glob/test/stat.js
ela-4.1.5 node_modules/glob/test/stat.js
ela-4.1.4 node_modules/glob/test/stat.js
ela-4.1.3 node_modules/glob/test/stat.js
ela-4.1.2 node_modules/glob/test/stat.js
ela-4.1.1 node_modules/glob/test/stat.js
ela-4.1.0 node_modules/glob/test/stat.js
ela-4.0.0 node_modules/glob/test/stat.js
ela-3.4.3 node_modules/glob/test/stat.js
ela-3.4.2 node_modules/glob/test/stat.js
ela-3.4.0 node_modules/glob/test/stat.js
ela-3.3.1 node_modules/glob/test/stat.js
ela-3.3.0 node_modules/glob/test/stat.js
ela-3.2.0 node_modules/glob/test/stat.js
ela-3.1.1 node_modules/glob/test/stat.js
ela-3.1.0 node_modules/glob/test/stat.js
ela-3.0.0 node_modules/glob/test/stat.js
ela-2.0.0 node_modules/glob/test/stat.js
ela-1.1.0 node_modules/glob/test/stat.js
blackboard-3.1.9 lib/site_template/node_modules/node-sass/node_modules/globule/node_modules/glob/test/stat.js