Update hash table methods.

This commit is contained in:
Oleksii Trekhleb
2018-05-31 21:35:53 +03:00
parent ecd8d22fc6
commit 5b3de38cca
2 changed files with 3 additions and 2 deletions

View File

@@ -43,12 +43,13 @@ describe('HashTable', () => {
expect(hashTable.get('a')).toBe('sky');
expect(hashTable.get('d')).toBe('ocean');
expect(hashTable.get('x')).not.toBeDefined();
hashTable.delete('a');
expect(hashTable.delete('not-existing')).toBeNull();
expect(hashTable.get('a')).toBeNull();
expect(hashTable.get('a')).not.toBeDefined();
expect(hashTable.get('d')).toBe('ocean');
hashTable.set('d', 'ocean-new');