2017-02-10 00:08:28 +00:00
|
|
|
/// <reference path="TestGame.ts" />
|
|
|
|
/// <reference path="Preload.ts" />
|
|
|
|
|
|
|
|
module TS.SpaceTac.UI.Specs {
|
|
|
|
describe("Preload", () => {
|
2017-02-21 22:38:31 +00:00
|
|
|
let testgame = setupSingleView(testgame => [new Preload(), []]);
|
|
|
|
|
|
|
|
it("loads correctly", function () {
|
|
|
|
expect(testgame.ui.state.current).toEqual("test");
|
2017-02-10 00:08:28 +00:00
|
|
|
// TODO test asset loading
|
|
|
|
});
|
2017-06-01 22:37:43 +00:00
|
|
|
|
|
|
|
it("builds cache keys from path", function () {
|
|
|
|
expect(Preload.getKey("dir/file-path")).toEqual("dir-file-path");
|
|
|
|
expect(Preload.getKey("dir/file-path.ext")).toEqual("dir-file-path");
|
|
|
|
expect(Preload.getKey("dir/file-path.mp3")).toEqual("dir-file-path");
|
|
|
|
});
|
2017-02-10 00:08:28 +00:00
|
|
|
});
|
|
|
|
}
|