Skip to content

Commit 26b3ea6

Browse files
committed
use partialDeepEquals for getLockCategories
1 parent f72b1ab commit 26b3ea6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/cases/getLockCategories.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import assert from "assert";
33
import { client } from "../utils/httpClient";
44
import { insertLock } from "../utils/queryGen";
55
import { multiGenRandomValue } from "../utils/getRandom";
6+
import { partialDeepEquals } from "../utils/partialDeepEquals";
67

78
const endpoint = "/api/lockCategories";
89
const defaultActionTypes = ["skip", "mute"];
@@ -29,7 +30,7 @@ const validateResponse = (videoID: string, overrides: lockOverrides = {}, expect
2930
return getLockCategories(videoID, actionTypes, service)
3031
.then(res => {
3132
assert.strictEqual(res.status, 200);
32-
assert.deepStrictEqual(res.data, expectedResponse);
33+
assert.ok(partialDeepEquals(res.data, expectedResponse));
3334
});
3435
};
3536

@@ -135,8 +136,8 @@ describe("getLockCategories", () => {
135136
return validateResponse(videoIDs[2], { actionTypes }, {
136137
categories: [
137138
"sponsor",
139+
"selfpromo",
138140
// "nonmusic", // no nonmusic since it's on other service
139-
"selfpromo"
140141
],
141142
reason: "3-longer-reason",
142143
actionTypes

0 commit comments

Comments
 (0)