Skip to content

Commit

Permalink
Capitalized 'Jasmine' twice and clarified how spec files are identified.
Browse files Browse the repository at this point in the history
There were two spots where Jasmine was not capitalized properly, and
the information describing how jasmine-node identifies spec files to
execute was not correct. Some testing shows that the file type (.js,
.coffee, and .litcoffee) must be lowercase, but the final ‘spec’ can be
any combination of upper or lower case letters.
  • Loading branch information
BurkHufnagel authored and BurkHufnagel committed Oct 29, 2016
1 parent 6c6099b commit 1a4cee3
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ jasmine-node

[![Build Status](https://secure.travis-ci.org/spaghetticode/jasmine-node.png)](http://travis-ci.org/spaghetticode/jasmine-node)

This node.js module makes the wonderful [Pivotal Lab's jasmine](http://github.com/pivotal/jasmine)
This node.js module makes the wonderful [Pivotal Lab's Jasmine](http://github.com/pivotal/jasmine)
spec framework available in node.js.

jasmine
Expand Down Expand Up @@ -53,10 +53,16 @@ Write the specifications for your code in `*.js` and `*.coffee` files in the `sp
You can use sub-directories to better organise your specs. In the specs use `describe()`, `it()` etc. exactly
as you would in client-side jasmine specs.

**Note**: your specification files must be named as `*spec.js`, `*spec.coffee` or `*spec.litcoffee`,
which matches the regular expression `/spec\.(js|coffee|litcoffee)$/i`;
otherwise jasmine-node won't find them!
For example, `sampleSpecs.js` is wrong, `sampleSpec.js` is right.
**Note**: Your specification files must be named as `*spec.js`, `*spec.coffee` or `*spec.litcoffee`,
which matches the regular expression `/spec\.(js|coffee|litcoffee)$/i`,
otherwise jasmine-node won't run them!

Another interesting point is that jasmine-node does a case-insensitive match against
the final `spec` in the file name, but it requires that the `.js`, `.coffee`, or `.litcoffee` suffix
must be all lowercase.

For example, `sampleSpecs.js` and `sampleSpec.JS` won't match or run, but `sampleSpec.js`, `sampleSPEC.js`
and `sample_spec.js` will run because they match the pattern.

If you have installed the npm package, you can run it with:

Expand Down

0 comments on commit 1a4cee3

Please sign in to comment.