Question

I've recently started looking into using Zombie.js + Mocha + Node.js as a unit testing framework for JavaScript files intended to be used client-side (e.g. in a browser).

Reading over the documentation though, I'm beginning to wonder if Zombie.js can be used for this purpose:

// Load the page from localhost
browser = new Browser();
browser.visit("http://localhost:3000/", function () { ... });

There doesn't seem to be any API for loading a static HTML file with Zombie.js. Can it be done? Can I just 'visit' a file:// URL and have it work? Or would I need to set up some sort of server on localhost for serving static HTML files? Is Zombie.js even a good choice for this sort of testing?

Was it helpful?

Solution

Yes. it supports loading static html files over file:// protocol. see change log: https://github.com/assaf/zombie/blob/master/CHANGELOG.md#version-096--2011-07-28

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top