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

truffle test doesn't check for filesystem errors when enumerating test files #837

Closed
benjamincburns opened this Issue Mar 7, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@benjamincburns
Copy link
Contributor

benjamincburns commented Mar 7, 2018

Issue

When truffle test enumerates test files in truffle-core/lib/commands/test.js, it ignores errors returned by the node-dir callback. This in turn causes the following error:

TypeError: Cannot read property 'filter' of undefined
    at truffle-core/lib/commands/test.js:47:1
    at truffle-core/~/node-dir/lib/paths.js:72:1
    at FSReqWrap.oncomplete (fs.js:166:21)

Steps to Reproduce

  1. cd to the root of any truffle project with tests
  2. Rename test to anything else (e.g. tests-backup)
  3. Run truffle test

Expected Behavior

Truffle would exit with an error indicating that the test directory cannot be found (e.g. ENOENT /path/to/project/test).

Actual Results

TypeError: Cannot read property 'filter' of undefined
    at truffle-core/lib/commands/test.js:47:1
    at truffle-core/~/node-dir/lib/paths.js:72:1
    at FSReqWrap.oncomplete (fs.js:166:21)

Environment

  • Operating System: OS X
  • Truffle version (truffle version): 4.1.0, but from what I can tell, this impacts all truffle versions
  • node version (node --version): node version doesn't matter, but tested on v6.11.5, v9.3.0, and v9.7.1
  • npm version (npm --version): Not important, but whatever nvm installs when it installs those versions of node.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.