Skip to content

Commit

Permalink
update stat test to do anything
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Sep 29, 2016
1 parent f65f9eb commit 12be3fc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/stat.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ var glob = require('../')
var test = require('tap').test
var path = require('path')
var Stats = require('fs').Stats
var dir = __dirname + '/fixtures'

test('stat all the things', function(t) {
var g = new glob.Glob('a/*abc*/**', { stat: true, cwd: __dirname })
var g = new glob.Glob('a/*abc*/**', { stat: true, cwd: dir })
var matches = []
g.on('match', function(m) {
matches.push(m)
Expand All @@ -23,7 +24,7 @@ test('stat all the things', function(t) {
t.same(eof, matches)
var cache = Object.keys(this.statCache)
t.same(cache.map(function (f) {
return path.relative(__dirname, f).replace(/\\/g, '/')
return path.relative(dir, f).replace(/\\/g, '/')
}).sort(), matches)

cache.forEach(function(c) {
Expand Down

0 comments on commit 12be3fc

Please sign in to comment.