Code coverage report for spec/algo/1-strings/escape.spec.js

Statements: 100% (10 / 10)      Branches: 100% (0 / 0)      Functions: 100% (4 / 4)      Lines: 100% (10 / 10)      Ignored: none     

All files » spec/algo/1-strings/ » escape.spec.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 191   1   1 1   1 1     1 1     1 1    
var escape = require("../../../lib/algorithms/1-strings/escape.js");
 
describe('When using escape() on a string', function () {
 
	var preEscape = "A beautiful test string      ";
	var postEscape = "A%20beautiful%20test%20string";
 
	it('a string is generated with no spaces.', function () {
		expect(escape(preEscape)).not.toContain(' ');
	});
 
	it('a string is generated with "%20"', function () {
		expect(escape(preEscape)).toContain('%20');
	});
 
	it('the correct value is output', function () {
		expect(escape(preEscape)).toEqual(postEscape);
	});
});