1
0
Fork 0
spacetac/src/ui/AssetLoading.spec.ts

19 lines
679 B
TypeScript
Raw Normal View History

/// <reference path="TestGame.ts" />
module TK.SpaceTac.UI.Specs {
2017-10-26 21:47:13 +00:00
testing("AssetLoading", test => {
2017-10-29 21:08:55 +00:00
let testgame = setupSingleView(test, () => [new AssetLoading(), []]);
2017-10-26 21:47:13 +00:00
test.case("loads correctly", check => {
check.equals(testgame.ui.state.current, "test");
// TODO test asset loading
});
2017-10-26 21:47:13 +00:00
test.case("builds cache keys from path", check => {
check.equals(AssetLoading.getKey("dir/file-path"), "dir-file-path");
check.equals(AssetLoading.getKey("dir/file-path.ext"), "dir-file-path");
check.equals(AssetLoading.getKey("dir/file-path.mp3"), "dir-file-path");
});
});
}