Code coverage report for spec/dataStructures/minHeap.one.spec.js

Statements: 100% (13 / 13)      Branches: 100% (0 / 0)      Functions: 100% (5 / 5)      Lines: 100% (13 / 13)      Ignored: none     

All files » spec/dataStructures/ » minHeap.one.spec.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 231   1 1 1   1 2 2     1 2     1 1     1 1    
var minHeap = require("../../lib/dataStructures/minHeap.js");
 
describe('When adding one element to the min heap', function () {
	var list;
	var testValue = "test_string"
 
	beforeEach(function() {
		list = new minHeap();
		list.add(testValue);
	});
 
	afterEach(function() {
		list = null;
	});
 
	it('the minHeap length should increase by 1', function () {
		expect(list.array.length).toBe(1);
	});
 
	it('the 1st element of the minHeap should contain the added value.', function () {
		expect(list.array[0]).toBe(testValue);
	});
});