1
0
Fork 0

Destroy the test game after each unit test

This commit is contained in:
Michaël Lemaire 2015-01-08 01:00:00 +01:00 committed by Michaël Lemaire
parent 09d07188aa
commit 3261e7bdb5
2 changed files with 3 additions and 2 deletions

View file

@ -5,7 +5,9 @@
<title>SpaceTac</title> <title>SpaceTac</title>
<link rel="stylesheet" href="main.css"> <link rel="stylesheet" href="main.css">
<!-- build:remove -->
<link rel="stylesheet" href="vendor/jasmine/lib/jasmine-core/jasmine.css"> <link rel="stylesheet" href="vendor/jasmine/lib/jasmine-core/jasmine.css">
<!-- /build -->
</head> </head>
<body> <body>

View file

@ -18,8 +18,7 @@ module SpaceTac.View.Specs {
orig_create.apply(state); orig_create.apply(state);
func(game, state); func(game, state);
done(); done();
game.state.clearCurrentState(); setTimeout(() => {game.destroy();}, 1000);
// TODO Find a way to game.destroy (it causes an error currently)
}; };
game.state.add("test", state); game.state.add("test", state);