Remove old tags.test.ts

This commit is contained in:
Alex Gleason 2024-05-21 13:37:24 -05:00
parent 5e607f664e
commit 9873afab69
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 0 additions and 25 deletions

View File

@ -1,25 +0,0 @@
import { assertEquals } from '@std/assert';
import { addTag, deleteTag, getTagSet } from './tags.ts';
Deno.test('getTagSet', () => {
assertEquals(getTagSet([], 'p'), new Set());
assertEquals(getTagSet([['p', '123']], 'p'), new Set(['123']));
assertEquals(getTagSet([['p', '123'], ['p', '456']], 'p'), new Set(['123', '456']));
assertEquals(getTagSet([['p', '123'], ['p', '456'], ['q', '789']], 'p'), new Set(['123', '456']));
});
Deno.test('addTag', () => {
assertEquals(addTag([], ['p', '123']), [['p', '123']]);
assertEquals(addTag([['p', '123']], ['p', '123']), [['p', '123']]);
assertEquals(addTag([['p', '123'], ['p', '456']], ['p', '123']), [['p', '123'], ['p', '456']]);
assertEquals(addTag([['p', '123'], ['p', '456']], ['p', '789']), [['p', '123'], ['p', '456'], ['p', '789']]);
});
Deno.test('deleteTag', () => {
assertEquals(deleteTag([], ['p', '123']), []);
assertEquals(deleteTag([['p', '123']], ['p', '123']), []);
assertEquals(deleteTag([['p', '123']], ['p', '456']), [['p', '123']]);
assertEquals(deleteTag([['p', '123'], ['p', '123']], ['p', '123']), []);
assertEquals(deleteTag([['p', '123'], ['p', '456']], ['p', '456']), [['p', '123']]);
});