Skip to content

Commit

Permalink
Add link script and docu to facilitate developing mocha-given #4
Browse files Browse the repository at this point in the history
  • Loading branch information
rendro committed Jul 14, 2014
1 parent 25be07a commit 5e23d8b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
},
"scripts": {
"prepublish": "./node_modules/.bin/coffee -cbo browser lib/mocha-given.coffee",
"test": "./node_modules/.bin/mocha -u mocha-given --compilers coffee:coffee-script -R spec"
"test": "./node_modules/.bin/mocha -u mocha-given --compilers coffee:coffee-script -R spec",
"link": "mkdir -p node_modules/mocha-given && cd node_modules/mocha-given && ln -s ../../package.json package.json && ln -s ../../index.js index.js && ln -s ../../lib lib && cd -"
},
"keywords": [
"mocha",
Expand Down
14 changes: 14 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,20 @@ you have to call the mocha binary directly:
$ ./node_modules/.bin/mocha -u mocha-given --compilers coffee:coffee-script -R spec
```

## Run mocha-given tests & start contributing

To run the `mocha-given` tests for developing, it has to be symlinked into the `node_modules` folder to enable `mocha` to resolve `mocha-given`.

Therefore run the script:

```
$ npm run link
```

Afterwards `mocha` has to be installed with ` $ npm install mocha`.

Now you can run the tests using `$ npm tests` and start contributing.

## Run tests programmatically

``` javascript
Expand Down

0 comments on commit 5e23d8b

Please sign in to comment.