I’m trying to do some simple view testing in my Node.JS
app using the Mocha testing framework…
For example, I want to test that the
on the page has
children, given the number of records I setup in my test.
I tried using Apricot
to do this, and while I got it to work, when it fails the error messages are fantastically unhelpful… also, it doesn’t always work.
What I’d love is a simple way to test the response body for HTML elements, so I can determine if they match the data they should be displaying.
Here’s my test in it’s current state: https://gist.github.com/2330685
Anyone know how I can do this?
Problem courtesy of: neezer