Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Glob pattern is not filtering files as expected #22

Open
etki opened this issue Aug 10, 2017 · 1 comment
Open

Glob pattern is not filtering files as expected #22

etki opened this issue Aug 10, 2017 · 1 comment

Comments

@etki
Copy link

etki commented Aug 10, 2017

Hi.
I was expecting glob to recursively list all files and (internally) reject all that don't match provided pattern. However, given following actions taken:

git clone https://github.com/ama-team/voxengine-sdk.git
cd voxengine-sdk
git checkout f2a0af
npm i glob-fs -D # installed version: 0.1.7
cat <<EOF > index.js   
var glob = require('glob-fs')
glob().readdirPromise('test/**/*.spec.js')
  .then(console.log.bind(console));
EOF
node index.js

I have following output:

[
  '/tmp/voxengine-sdk/test/mocha.opts', // unexpected
  '/tmp/voxengine-sdk/test/spec/http/_common.spec.js',
  '/tmp/voxengine-sdk/test/spec/http/basic.spec.js',
  '/tmp/voxengine-sdk/test/spec/http/rest.spec.js',
  '/tmp/voxengine-sdk/test/spec/logger/_common.spec.js',
  '/tmp/voxengine-sdk/test/spec/logger/slf4j.spec.js',
  '/tmp/voxengine-sdk/test/support/mocha-multi-reporters.json', // unexpected
  '/tmp/voxengine-sdk/test/support/setup.js' // unexpected
]

Looks like it's either me misinterpreting how this package is designed to work (and all of the above is valid output) or a bug

@jonschlinkert
Copy link
Member

Yeah, that's definitely a bug. This package is being refactored completely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants