Destroy the test game after each unit test
This commit is contained in:
parent
09d07188aa
commit
3261e7bdb5
|
@ -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>
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue