Skip to content

Commit ada7076

Browse files
committed
Update test.ts
1 parent 6ef415d commit ada7076

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

design-a-food-rating-system/test.ts

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,59 @@ Deno.test("design-a-food-rating-system", () => {
4444
const o = [null, null, null, null, "ammxyb"];
4545
assertEquals(runScript(c, i, [FoodRatings]), o);
4646
});
47+
Deno.test("design-a-food-rating-system", () => {
48+
const e: any[][] = [[[
49+
"FoodRatings",
50+
"highestRated",
51+
"highestRated",
52+
"changeRating",
53+
"highestRated",
54+
"changeRating",
55+
"highestRated",
56+
], [
57+
[["kimchi", "miso", "sushi", "moussaka", "ramen", "bulgogi"], [
58+
"korean",
59+
"japanese",
60+
"japanese",
61+
"greek",
62+
"japanese",
63+
"korean",
64+
], [9, 12, 8, 15, 14, 7]],
65+
["korean"],
66+
["japanese"],
67+
["sushi", 16],
68+
["japanese"],
69+
["ramen", 16],
70+
["japanese"],
71+
]], [
72+
[
73+
"FoodRatings",
74+
"changeRating",
75+
"highestRated",
76+
"changeRating",
77+
"changeRating",
78+
"highestRated",
79+
],
80+
[
81+
[["czopaaeyl", "lxoozsbh", "kbaxapl"], [
82+
"dmnuqeatj",
83+
"dmnuqeatj",
84+
"dmnuqeatj",
85+
], [11, 2, 15]],
86+
["czopaaeyl", 12],
87+
["dmnuqeatj"],
88+
["kbaxapl", 8],
89+
["lxoozsbh", 5],
90+
["dmnuqeatj"],
91+
],
92+
]];
93+
const o = [[null, "kimchi", "ramen", null, "sushi", null, "ramen"], [
94+
null,
95+
null,
96+
"kbaxapl",
97+
null,
98+
null,
99+
"czopaaeyl",
100+
]];
101+
assertEquals(e.map((v) => runScript(v[0], v[1], [FoodRatings])), o);
102+
});

0 commit comments

Comments
 (0)