A clean and minimal youtube frontend, without all the ads and whistles
JavaScript
test: add filter videos based on excluded terms
Christian Fei0ff58d03bb58
diff --git a/test/repository.test.js b/test/repository.test.jsindex 606f2e3..51c5e81 100644--- a/test/repository.test.js+++ b/test/repository.test.js@@ -150,8 +150,16 @@ describe('excluded terms', () => {assert.deepEqual(repo.getExcludedTerms(), [])})- test('returns videos based on excluded terms', () => {-+ test('returns videos based on excluded terms', async () => {+ repo.addExcludedTerm('trump')+ const videos = [{title: 'The Trump Show', channel: 'CNN'}, {title: 'The Biden Report', channel: 'NBC'}]+ repo.upsertVideos(videos)+ const results = await repo.getVideos()+ assert.equal(results.length, 1)+ assert.deepEqual(results[0], {+ "channel": "NBC",+ "title": "The Biden Report",+ })})})