2019-11-21 22:14:27 +00:00
|
|
|
import { testing } from "../common/Testing";
|
|
|
|
import { AssetLoading } from "./AssetLoading";
|
|
|
|
import { setupSingleView } from "./TestGame";
|
2017-10-08 21:25:24 +00:00
|
|
|
|
2019-11-21 22:14:27 +00:00
|
|
|
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");
|
|
|
|
});
|
|
|
|
});
|