The current approach we use is to use the npm scripts block to define our
own custom targets along with using the standardized pretest, test, and
posttest hooks. Since our integration tests require external resources such
as a database to be up and running we don't run those as part of "npm test"
but instead use "npm run integration" to handle that. A sample scripts
block in our package.json then looks like:

  "scripts": {
    "pretest": "jshint src --config jshint/server.json && jshint test
--config jshint/server.spec.json",
    "test": "istanbul test --dir ./coverage/test jasmine-node --
--junitreport test",
    "integration": "jshint integration --config jshint/server.spec.json &&
istanbul test --dir ./coverage/integration -x '**/integration/**'
integration/integration.js",
  },


-- Daniel R. <[email protected]> [http://danielr.neophi.com/]


On Mon, Feb 11, 2013 at 7:14 AM, Jorge Ferrando <[email protected]>wrote:

> 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.
>
>
>

-- 
-- 
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.


Reply via email to