UNPKG

@dxzmpk/js-algorithms-data-structures

Version:

Algorithms and data-structures implemented on JavaScript

13 lines (10 loc) 270 B
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(); }); });