-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathshape.test.ts
36 lines (29 loc) · 866 Bytes
/
shape.test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import { renderShape } from "../src/shapes";
import Shapes from "../src/shapes";
import { assert } from "chai";
describe("Shapes", () => {
describe("Render", () => {
it("should return c", () => {
assert.equal(renderShape(Shapes.Circle), "c");
});
it("should return +", () => {
assert.equal(renderShape(Shapes.Cross), "+");
});
it("should return s", () => {
assert.equal(renderShape(Shapes.Square), "s");
});
it("should return *", () => {
assert.equal(renderShape(Shapes.Star), "*");
});
it("should return w", () => {
assert.equal(renderShape(Shapes.Whot), "w");
});
it("should return t", () => {
assert.equal(renderShape(Shapes.Triangle), "t");
});
it("should return same", () => {
// @ts-ignore
assert.equal(renderShape("same"), "same");
});
});
});