We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70a9382 commit 4078d42Copy full SHA for 4078d42
__tests__/test.ts
@@ -16,3 +16,23 @@ describe("Enum", () => {
16
})).toEqual({ BLACK: "black", WHITE: "white" });
17
});
18
19
+
20
+describe("Enum.keys", () => {
21
+ it("returns the keys of an enum object", () => {
22
+ const e = Enum({
23
+ BLACK: "black",
24
+ WHITE: "white",
25
+ });
26
+ expect(Enum.keys(e)).toEqual(expect.arrayContaining([ "WHITE", "BLACK" ]));
27
28
+};
29
30
+describe("Enum.values", () => {
31
+ it("returns the values of an enum object", () => {
32
33
34
35
36
+ expect(Enum.values(e)).toEqual(expect.arrayContaining([ "white", "black" ]));
37
38
+});
0 commit comments