1
0
Fork 0
spacetac/src/ui/AssetLoading.spec.ts
2019-11-21 23:14:27 +01:00

14 lines
539 B
TypeScript

import { testing } from "../common/Testing";
import { AssetLoading } from "./AssetLoading";
import { setupSingleView } from "./TestGame";
testing("AssetLoading", test => {
let testgame = setupSingleView(test, () => [new AssetLoading({}), []]);
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");
});
});