tests: Only initialize casper once

(imported from commit 849b8cfc0545fb0ff51dbfc32d2bc6081c0a5215)
This commit is contained in:
Zev Benjamin 2014-03-07 17:46:33 -05:00 committed by Steve Howell
parent 0fbfbf488b
commit 917a4363e7
1 changed files with 4 additions and 0 deletions

View File

@ -22,6 +22,10 @@ function log_in(credentials) {
}
exports.initialize_casper = function (viewport) {
if (casper.zulip_initialized !== undefined) {
return;
}
casper.zulip_initialized = true;
// These initialization steps will fail if they run before
// casper.start has been called.