fix typo in tests

This commit is contained in:
Michael C
2021-07-12 00:32:51 -04:00
parent 0b7ba793b4
commit a8f7080bf2

View File

@@ -11,7 +11,7 @@ const mockManager = ImportMock.mockStaticClass(YouTubeAPIModule, 'YouTubeAPI');
const sinonStub = mockManager.mock('listVideos'); const sinonStub = mockManager.mock('listVideos');
sinonStub.callsFake(YouTubeApiMock.listVideos); sinonStub.callsFake(YouTubeApiMock.listVideos);
describe('getSegmentsByHash', () => { describe('getSkipSegmentsByHash', () => {
before(async () => { before(async () => {
const query = 'INSERT INTO "sponsorTimes" ("videoID", "startTime", "endTime", "votes", "UUID", "userID", "timeSubmitted", views, category, "actionType", "service", "hidden", "shadowHidden", "hashedVideoID") VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; const query = 'INSERT INTO "sponsorTimes" ("videoID", "startTime", "endTime", "votes", "UUID", "userID", "timeSubmitted", views, category, "actionType", "service", "hidden", "shadowHidden", "hashedVideoID") VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)';
await db.prepare("run", query, ['getSegmentsByHash-0', 1, 10, 2, 'getSegmentsByHash-0-0', 'testman', 0, 50, 'sponsor', 'skip', 'YouTube', 0, 0, 'fdaff4dee1043451faa7398324fb63d8618ebcd11bddfe0491c488db12c6c910']); await db.prepare("run", query, ['getSegmentsByHash-0', 1, 10, 2, 'getSegmentsByHash-0-0', 'testman', 0, 50, 'sponsor', 'skip', 'YouTube', 0, 0, 'fdaff4dee1043451faa7398324fb63d8618ebcd11bddfe0491c488db12c6c910']);
@@ -109,7 +109,7 @@ describe('getSegmentsByHash', () => {
it('Should return 400 for no hash', (done: Done) => { it('Should return 400 for no hash', (done: Done) => {
fetch(getbaseURL() + '/api/skipSegments/?categories=["shilling"]') fetch(getbaseURL() + '/api/skipSegments/?categories=["shilling"]')
.then(res => { .then(res => {
assert.strictEqual(res.status, 404); assert.strictEqual(res.status, 400);
done(); done();
}) })
.catch(err => done(err)); .catch(err => done(err));