Is there a capybara for Node.js?
Does anyone know whether there is anything similar to capybara for Node.js?
How about Zombie?
Insanely fast, headless full-stack testing using Node.js
If you're going to write an insanely fast, headless browser, how can you not call it Zombie Zombie it is.
I'm hoping that when the phantomjs webdriver wire protocol is finished (https://github.com/detro/ghostdriver) and if Soda/Selenium (https://github.com/LearnBoost/soda) is able to drive it then the headless tests will be able to be automated via Selenium thus bypassing the need for Capybara.
I'm a rails-turned-node developer and I've always been looking for a analogy in the JS world for the winning RSpec/Capybara combination. Here is what I've found what I like best.
- Mocha - for running asynchronous tests
- Chai - for assertions
- Request - for handling HTTP request/response
- Cheerio - for selecting HTML elements from responses
Here is a more involved post on how to set up this stack including continuous test running.
I've created a library to help out with cucumber-js. It gives you callable steps and parsed arguments. This works with cucumber and doesn't replace it.
- Sync step definitions, no more callbacks;
- Call other step from step definitions;
- Parse values such as arrays, objects and decimals;
Hope you find it useful (:
We created a complete acceptance testing solution in JS
It uses CucumberJS (Mocha/Jasmine soon) to drive your acceptance tests
- Downloads and starts Phantom / Selenium
- Injects a preconfigured Webdriver.IO instance into the testing context
- Includes the request npm library (for REST) the assertion library of your choice (Chai / Jasmine-expect)
- Uses fibers for synchronous testing (no callback hell / promise confusion)
- Works with SauceLabs / BrowserStacks etc
- Support outside in testing with a watch mode that continuously runs the scenarios you tag with @focus
- Supports CI out of the box and tested on Circle/Codeship/Travis (using headless Chrome/Firefox)
It doesn't make you coffee, yet
Yes, see expresso and more here - Unit testing framework for node.js that specifically supports testing async code?