npm run-script test*
package.json:
{
"blablabla":"moreblabla",
"scripts":{
"test": "mocha tests/unit",
"integration": "mocha tests/integration",
"spec": "mocha tests/spec",
"alltests": "mocha tests",
}
}
layout of tests directory:
tests/unit -> unit tests, test run immediately and fast
tests/integration -> integration tests, which need at least to mock or
setup some infrastructure i.E. in-memory-db or so
tests/spec -> acceptance tests -> tests usually involving the whole app
including the ui, driven by Fit/Watir/Selenium and/or a (headless) Browser
tests/data -> static data for testcases i.E. json data, DB-population
scripts/sql, config files
tests/util -> shared things i.E. chai-plugin configuration etc.
this is what i do.
Am Montag, 11. Februar 2013 13:14:56 UTC+1 schrieb Jorge Ferrando:
>
> hi, everybody.
>
> How do you run your tests in your projects? We want to run separately
> unit tests, integration tests and acceptance (service) tests.
> By now we are using "npm test" to run all together and "make test-unit",
> "make test-integration", "make test-acceptance" to run it separatly.
> We wonder if there is a way to do it all with npm but what we really want
> is to do it the best way.
>
> Thank you!
>
--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.