From 6f91ffeb914e3a3670d675397cbdbff5cf590edd Mon Sep 17 00:00:00 2001 From: Vojta Jina Date: Tue, 3 Jan 2012 14:49:41 -0800 Subject: style: prefer single quotes + some whitespaces --- test/BinderSpec.js | 84 +++++++++++++++++++++++++++--------------------------- 1 file changed, 42 insertions(+), 42 deletions(-) (limited to 'test/BinderSpec.js') diff --git a/test/BinderSpec.js b/test/BinderSpec.js index 34504b30..efe7215b 100644 --- a/test/BinderSpec.js +++ b/test/BinderSpec.js @@ -49,50 +49,50 @@ describe('Binder', function() { })); it('ReplaceBindingInTextWithSpan preserve surounding text', function() { - expect(this.compileToHtml("a{{b}}c")).toBe('ac'); + expect(this.compileToHtml('a{{b}}c')).toBe('ac'); }); it('ReplaceBindingInTextWithSpan', function() { - expect(this.compileToHtml("{{b}}")).toBe(''); + expect(this.compileToHtml('{{b}}')).toBe(''); }); it('BindingSpaceConfusesIE', inject(function($rootScope, $compile) { if (!msie) return; - var span = document.createElement("span"); + var span = document.createElement('span'); span.innerHTML = ' '; var nbsp = span.firstChild.nodeValue; - expect(this.compileToHtml("{{a}} {{b}}")). + expect(this.compileToHtml('{{a}} {{b}}')). toBe('' + nbsp + ''); dealoc(($rootScope)); - expect(this.compileToHtml("{{A}} x {{B}} ({{C}})")). + expect(this.compileToHtml('{{A}} x {{B}} ({{C}})')). toBe('' + nbsp + 'x ' + '' + nbsp + '()'); })); it('BindingOfAttributes', inject(function($rootScope, $compile) { - var element = $compile("")($rootScope); - var attrbinding = element.attr("ng:bind-attr"); + var element = $compile('')($rootScope); + var attrbinding = element.attr('ng:bind-attr'); var bindings = fromJson(attrbinding); - expect(decodeURI(bindings.href)).toBe("http://s/a{{b}}c"); + expect(decodeURI(bindings.href)).toBe('http://s/a{{b}}c'); expect(bindings.foo).toBeFalsy(); })); it('MarkMultipleAttributes', inject(function($rootScope, $compile) { var element = $compile('')($rootScope); - var attrbinding = element.attr("ng:bind-attr"); + var attrbinding = element.attr('ng:bind-attr'); var bindings = fromJson(attrbinding); - expect(bindings.foo).toBe("{{d}}"); - expect(decodeURI(bindings.href)).toBe("http://s/a{{b}}c"); + expect(bindings.foo).toBe('{{d}}'); + expect(decodeURI(bindings.href)).toBe('http://s/a{{b}}c'); })); it('AttributesNoneBound', inject(function($rootScope, $compile) { - var a = $compile("")($rootScope); - expect(a[0].nodeName).toBe("A"); - expect(a.attr("ng:bind-attr")).toBeFalsy(); + var a = $compile('')($rootScope); + expect(a[0].nodeName).toBe('A'); + expect(a.attr('ng:bind-attr')).toBeFalsy(); })); it('ExistingAttrbindingIsAppended', inject(function($rootScope, $compile) { - var a = $compile("")($rootScope); + var a = $compile('')($rootScope); expect(a.attr('ng:bind-attr')).toBe('{"b":"{{def}}","href":"http://s/{{abc}}"}'); })); @@ -117,7 +117,7 @@ describe('Binder', function() { })); it('InputTypeButtonActionExecutesInScope2', inject(function($rootScope, $compile) { - var log = ""; + var log = ''; var element = $compile('')($rootScope); $rootScope.action = function() { log += 'click;'; @@ -143,8 +143,8 @@ describe('Binder', function() { '')($rootScope); - var items = [{a:"A"}, {a:"B"}]; - $rootScope.model = {items:items}; + var items = [{a: 'A'}, {a: 'B'}]; + $rootScope.model = {items: items}; $rootScope.$apply(); expect(sortedHtml(form)).toBe( @@ -154,7 +154,7 @@ describe('Binder', function() { '
  • B
  • ' + ''); - items.unshift({a:'C'}); + items.unshift({a: 'C'}); $rootScope.$apply(); expect(sortedHtml(form)).toBe( '