Clean up a bunch of spec global variable leaks

Also some formatting changes to highlight when using one 'var' with comma operator
This commit is contained in:
Sheel Choksi
2014-01-18 14:17:14 -08:00
parent 8ca08ff999
commit 9c7ba43ebd
10 changed files with 74 additions and 69 deletions

View File

@@ -3,7 +3,8 @@ describe("toContain", function() {
var util = {
contains: jasmine.createSpy('delegated-contains').and.returnValue(true)
},
matcher = j$.matchers.toContain(util);
matcher = j$.matchers.toContain(util),
result;
result = matcher.compare("ABC", "B");
expect(util.contains).toHaveBeenCalledWith("ABC", "B", []);
@@ -15,7 +16,8 @@ describe("toContain", function() {
contains: jasmine.createSpy('delegated-contains').and.returnValue(true)
},
customEqualityTesters = ['a', 'b'],
matcher = j$.matchers.toContain(util, customEqualityTesters);
matcher = j$.matchers.toContain(util, customEqualityTesters),
result;
result = matcher.compare("ABC", "B");
expect(util.contains).toHaveBeenCalledWith("ABC", "B", ['a', 'b']);