0

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: "[email protected]"
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.

3 Answers 3

2

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.

Sign up to request clarification or add additional context in comments.

1 Comment

And it seems to be well integrated with mocha (another related question here : stackoverflow.com/a/9444550/657524).
1

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

Comments

0

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

1 Comment

I am currently using mocha 1.x

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.