Write tests for result pages (and related actions)

This commit is contained in:
Rowan Manning
2013-11-22 11:44:54 +00:00
parent ea330548b1
commit d57ae45b4f
3 changed files with 122 additions and 8 deletions

View File

@@ -30,14 +30,20 @@ function createNavigator (baseUrl, store) {
store.response = res;
store.status = res.statusCode;
jsdom.env(
store.body,
function (err, window) {
store.window = window;
store.dom = window.document;
callback();
}
);
if (opts.nonDom) {
store.window = null;
store.dom = null;
callback();
} else {
jsdom.env(
store.body,
function (err, window) {
store.window = window;
store.dom = window.document;
callback();
}
);
}
});