Align saved video actions and confirm storage removal
This commit is contained in:
11
frontend/saved-page.test.js
Normal file
11
frontend/saved-page.test.js
Normal file
@@ -0,0 +1,11 @@
|
||||
const test = require('node:test');
|
||||
const assert = require('node:assert/strict');
|
||||
const { matches } = require('./saved-page.js');
|
||||
test('saved filtering matches title and channel without changing the library', () => {
|
||||
const video = { id: 'one', title: 'A quiet morning', channel: 'Studio sessions' };
|
||||
assert.equal(matches(video, 'QUIET'), true);
|
||||
assert.equal(matches(video, 'studio'), true);
|
||||
assert.equal(matches(video, 'evening'), false);
|
||||
assert.equal(matches({ id: 'unknown' }, 'unknown'), true);
|
||||
assert.equal(matches(video, ''), true);
|
||||
});
|
||||
Reference in New Issue
Block a user