Manuel Leduc
Manuel Leduc

Reputation: 1919

Advanced front end test framework for node.js

I am working on a node.js + express application.

And what I am trying to do is defining a strong test base to work with.

So I read this really nice article which explains how to develop a simple application with ruby on rails.

And I read the following lines of code which inspired me a lot :

visit signup_path
fill_in "Name",         with: "Example User"
fill_in "Email",        with: "user@example.com"
fill_in "Password",     with: "foobar"
fill_in "Confirmation", with: "foobar"
click_button "Create my account"

So here I come to the point. Is there a way to write a similar piece of code using node.js and its dependencies ?

I am currently using mocha 1.x, should 1.2.x and supertest 0.6.x but they didn't seems to fit my needs.

Upvotes: 0

Views: 612

Answers (3)

Chris
Chris

Reputation: 4225

What you are looking for is something like zombie.js or selenium (js-webdriver) which test your code from the browsers pov. I recommend taking a look at zombie.js first.

Upvotes: 2

Sagish
Sagish

Reputation: 1065

Mocha.js is a popular choice as well, especially if you're into Coffeescript

Upvotes: 0

Antarr Byrd
Antarr Byrd

Reputation: 26169

Have you looked at Jasmine. Nettut's has a great tutorial http://net.tutsplus.com/tutorials/javascript-ajax/testing-your-javascript-with-jasmine/

Upvotes: 1

Related Questions