evilstreak / markdown-js

A Markdown parser for javascript
7.7k stars 863 forks source link

test with npm test #21

Closed benatkin closed 12 years ago

benatkin commented 13 years ago

It would be easier to get acquainted with this package if package.json was set up to support running the test suite with npm test. I'm interested in coding this up myself but I haven't started yet.

ashb commented 13 years ago

Last time I looked at npm it didn't have anything about this - got any pointers about what it needs/how it behaves?

benatkin commented 13 years ago

Here's a pretty minimal example: https://github.com/substack/js-traverse/blob/master/package.json

One nice thing about it is being able to install a package globally and test it. Here's what I just ran:

(mbp) ~/src/github/evilstreak/markdown-js $ npm install -g traverse
traverse@0.4.3 /Users/bat/.npm/nvm/0.0.6/package/v0.4.7/lib/node_modules/traverse
(mbp) ~/src/github/evilstreak/markdown-js $ npm test -g traverse

> traverse@0.4.3 test /Users/bat/.npm/nvm/0.0.6/package/v0.4.7/lib/node_modules/traverse
> expresso

   100% 47 tests

(mbp) ~/src/github/evilstreak/markdown-js $