From 3261e7bdb5d3a7f4888532efc6166a45e6080c5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Lemaire?= Date: Thu, 8 Jan 2015 01:00:00 +0100 Subject: [PATCH] Destroy the test game after each unit test --- src/index.html | 2 ++ src/scripts/view/specs/TestGame.ts | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/index.html b/src/index.html index 7a075bf..06557f8 100644 --- a/src/index.html +++ b/src/index.html @@ -5,7 +5,9 @@ SpaceTac + + diff --git a/src/scripts/view/specs/TestGame.ts b/src/scripts/view/specs/TestGame.ts index ce4b9d2..3bd535a 100644 --- a/src/scripts/view/specs/TestGame.ts +++ b/src/scripts/view/specs/TestGame.ts @@ -18,8 +18,7 @@ module SpaceTac.View.Specs { orig_create.apply(state); func(game, state); done(); - game.state.clearCurrentState(); - // TODO Find a way to game.destroy (it causes an error currently) + setTimeout(() => {game.destroy();}, 1000); }; game.state.add("test", state);