Merge branch 'master' of https://github.com/ajayyy/SponsorBlockServer into stricter-eslint

This commit is contained in:
Michael C
2021-07-18 02:27:48 -04:00
6 changed files with 87 additions and 12 deletions

View File

@@ -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));