Sha256: a51ada4ba48e6df875c28187495305b2bc40fe1fc2e23c5d8b3aa5fc30b154d7

Contents?: true

Size: 779 Bytes

Versions: 13

Compression:

Stored size: 779 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).replace(/\\/g, '/')
    }).sort(), matches)

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

    t.end()
  })
})

Version data entries

13 entries across 11 versions & 3 rubygems

Version Path
entangled-0.0.16 spec/dummy/public/node_modules/bower/node_modules/glob/test/stat.js
entangled-0.0.15 spec/dummy/public/node_modules/bower/node_modules/glob/test/stat.js
entangled-0.0.14 spec/dummy/public/node_modules/bower/node_modules/glob/test/stat.js
entangled-0.0.13 spec/dummy/public/node_modules/bower/node_modules/glob/test/stat.js
entangled-0.0.12 spec/dummy/public/node_modules/bower/node_modules/glob/test/stat.js
entangled-0.0.11 spec/dummy/public/node_modules/bower/node_modules/glob/test/stat.js
entangled-0.0.10 spec/dummy/public/node_modules/bower/node_modules/glob/test/stat.js
trans-0.5.10 template/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob/test/stat.js
trans-0.5.10 template/node_modules/grunt-contrib-jshint/node_modules/jshint/node_modules/cli/node_modules/glob/test/stat.js
trans-0.5.9 template/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob/test/stat.js
trans-0.5.9 template/node_modules/grunt-contrib-jshint/node_modules/jshint/node_modules/cli/node_modules/glob/test/stat.js
pleeease-0.0.3 node_modules/pleeease/node_modules/multi-glob/node_modules/glob/test/stat.js
pleeease-0.0.2 node_modules/pleeease/node_modules/multi-glob/node_modules/glob/test/stat.js