jasmine / jasmine-npm

A jasmine runner for node projects.
MIT License
376 stars 145 forks source link

Add a `--verbose` flag #211

Closed DanKaplanSES closed 2 months ago

DanKaplanSES commented 9 months ago

This could save a lot of time when troubleshooting unexpected behavior. I was trying to set up a new project and went through this experience:

  1. I created a spec with expect(true).toBe(false); and ran jasmine.
  2. Why does it say no specs found? Where is it looking?
  3. Does the command line have a --verbose flag (or equivalent)? No. Not that I can find.
  4. Then I googled. I couldn't find anything relevant, but some of the links gave me ideas.
  5. I had set "spec_dir" to "", ".", "/", and "./"—something I've never done before. _Is this a bug of some sort, where Jasmine doesn't scan for specs in the same directory as "specdir"?
  6. No, because I created a subdirectory and put a spec in there. It couldn't find it either. _Is this a limitation of some sort, where you can't specify a "specdir" at the project root?
  7. No, because...
  8. Is my config file actually being used?
  9. No. My config file isn't named jasmine.json, so jasmine won't use it by default. That's the problem.

I've run into similar problems in the past where a --verbose flag would've helped so I'd like to request this as a feature. Thanks


jasmine v5.1.0
jasmine-core v5.1.1
sgravrock commented 7 months ago

That seems like a nice feature to have. I'd be happy to review a PR that adds it.