From 917a4363e793d53f93ea22fa6613d49fe935a7e6 Mon Sep 17 00:00:00 2001 From: Zev Benjamin Date: Fri, 7 Mar 2014 17:46:33 -0500 Subject: [PATCH] tests: Only initialize casper once (imported from commit 849b8cfc0545fb0ff51dbfc32d2bc6081c0a5215) --- zerver/tests/frontend/common.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zerver/tests/frontend/common.js b/zerver/tests/frontend/common.js index e26b9373e2..0cd4420ce8 100644 --- a/zerver/tests/frontend/common.js +++ b/zerver/tests/frontend/common.js @@ -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.