jasmine-npm
jasmine-npm copied to clipboard
Can I use jasmine without jasmine.json?
Basically I want run jasmine command and it will run all *spec.js
under spec
directory. But I hate to maintain jasmine.json
as another config file. I wonder if there's any default values for like spec_dir
and spec_files
. I'd love to follow the default values, if any. I will never want to customize them. Even command line argument like npx jasmine -spec_dir spec
would be great to me. Thanks.
There is not currently a way to run Jasmine with the Node.js tooling without specifying a config file (either via the --config
argument or JASMINE_CONFIG_PATH
environment variable). I could see there being a use case though to just skip loading a config file altogether if one wasn't specified on the command line, and the default location didn't exist. The change for this would actually be over in jasmine-npm, and I would want to make sure everything still worked properly without a configuration call. I would be happy to review a pull request there to make this change.
Thanks for using Jasmine!
Thanks for clarifying it.
Nowadays npx jasmine spec/**/*.js
works for running all specs in a directory without a config file. (Or with quotes, npx jasmine 'spec/**/*.js'
if you're using a shell that doesn't do bash-compatible file globbing.)