Refactor Heaps.

This commit is contained in:
Oleksii Trekhleb
2018-08-16 21:03:32 +03:00
parent 10e633f075
commit 031c5da556
4 changed files with 30 additions and 23 deletions

View File

@@ -0,0 +1,12 @@
import Heap from '../Heap';
describe('Heap', () => {
it('should not allow to create instance of the Heap directly', () => {
const instantiateHeap = () => {
const heap = new Heap();
heap.add(5);
};
expect(instantiateHeap).toThrow();
});
});