settinghead
settinghead

Reputation: 95

A simple way to set up automated BDD test environment for Node.js server + SPA javascript framework?

Here's my project's setup:

  1. Frontend: Angular.js/Backbone.js SPA app
  2. Backend: Node.js + NoSQL db as backend
  3. Testing:
    • Already have Karma set up for SPA testing (with mock JSON responses)
    • Already have Mocha set up for Node.js, with an isolated "test" environment for test DB setup and teardown

Now the problem comes when I try to set up integrated BDD test (namely, start node servers, start a browser and run SPA tests inside the browser with actual JSON calls to the backend). After some searching, I failed to find a simple and straightforward solution to my problem, so I thought I'd ask here so other people in similar situation may also benefit from the answers. Thanks!

Upvotes: 1

Views: 674

Answers (1)

srquinn
srquinn

Reputation: 10501

I would suggest Gruntjs all the way. While on the surface it seems like just another redo of make(1), the community support and HUGE collection of plugins makes it super useful. It will solve all the problems you mentioned plus some.

Website

Github

Upvotes: 2

Related Questions