Skip to content

Commit

Permalink
Do not use skinview3d namespace in test.ts
Browse files Browse the repository at this point in the history
The functions we need to test may not be exported by ../src/skinview3d
  • Loading branch information
yushijinhun committed Oct 27, 2018
1 parent b9244a0 commit 7ed31e6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/test.ts
@@ -1,7 +1,7 @@
/// <reference path="shims.d.ts"/>

import { expect } from "chai";
import * as skinview3d from "../src/skinview3d";
import { isSlimSkin } from "../src/utils";

import skin1_8Default from "./textures/skin-1.8-default-no_hd.png";
import skin1_8Slim from "./textures/skin-1.8-slim-no_hd.png";
Expand All @@ -13,21 +13,21 @@ describe("detect model of texture", () => {
const image = document.createElement("img");
image.src = skin1_8Default;
await Promise.resolve();
expect(skinview3d.isSlimSkin(image)).to.equal(false);
expect(isSlimSkin(image)).to.equal(false);
});

it("1.8 slim", async () => {
const image = document.createElement("img");
image.src = skin1_8Slim;
await Promise.resolve();
expect(skinview3d.isSlimSkin(image)).to.equal(true);
expect(isSlimSkin(image)).to.equal(true);
});

it("old default", async () => {
const image = document.createElement("img");
image.src = skinOldDefault;
await Promise.resolve();
expect(skinview3d.isSlimSkin(image)).to.equal(false);
expect(isSlimSkin(image)).to.equal(false);
});

/* TODO: implement transparent hat check for 64x32 skins
Expand Down

0 comments on commit 7ed31e6

Please sign in to comment.