mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-11 22:17:14 +03:00
Merge branch 'master' of https://github.com/ajayyy/SponsorBlockServer into stricter-eslint
This commit is contained in:
@@ -5,12 +5,6 @@ import {db} from "../../src/databases/databases";
|
||||
import assert from "assert";
|
||||
import {LockCategory} from "../../src/types/segments.model";
|
||||
|
||||
const deepStringEqual = (a: string[], b: string[]): boolean => {
|
||||
if (a.length !== b.length) return false;
|
||||
a.forEach((e) => { if (!b.includes(e)) return false; });
|
||||
return true;
|
||||
};
|
||||
|
||||
describe("lockCategoriesRecords", () => {
|
||||
before(async () => {
|
||||
const insertVipUserQuery = 'INSERT INTO "vipUsers" ("userID") VALUES (?)';
|
||||
@@ -571,7 +565,7 @@ describe("lockCategoriesRecords", () => {
|
||||
.then(async res => {
|
||||
assert.strictEqual(res.status, 200);
|
||||
const data = await res.json();
|
||||
assert.ok(deepStringEqual(data.categories, expected.categories));
|
||||
assert.deepStrictEqual(data.categories, expected.categories);
|
||||
done();
|
||||
})
|
||||
.catch(err => done(err));
|
||||
|
||||
Reference in New Issue
Block a user