language
stringclasses
1 value
owner
stringlengths
2
15
repo
stringlengths
2
21
sha
stringlengths
45
45
message
stringlengths
7
36.3k
path
stringlengths
1
199
patch
stringlengths
15
102k
is_multipart
bool
2 classes
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-handlebars/lib/controls/select.js
@@ -536,9 +536,9 @@ Ember.Select = Ember.View.extend( content = get(this, 'content'), selection = get(this, 'selection'); - if (!content){ return; } + if (!content) { return; } if (options) { - var selectedIndexes = options.map(function(){ + var selectedIndexes = options.map(function() { return this.index - offset; }).toArray(); var newSelection = content.objectsAt(selectedIndexes);
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-handlebars/lib/ext.js
@@ -132,7 +132,7 @@ Ember.Handlebars.registerHelper('helperMissing', function(path, options) { var error, view = ""; error = "%@ Handlebars error: Could not find property '%@' on object %@."; - if (options.data){ + if (options.data) { view = options.data.view; } throw new Ember.Error(Ember.String.fmt(error, [view, path, this])); @@ -169,7 +169,7 @@ Ember.Handlebars.registerHelper('helperMissing', function(path, options) { Ember.Handlebars.registerBoundHelper('repeat', function(value, options) { var count = options.hash.count; var a = []; - while(a.length < count){ + while(a.length < count) { a.push(value); } return a.join(''); @@ -419,7 +419,7 @@ function evaluateUnboundHelper(context, fn, normalizedProperties, options) { @for Ember.Handlebars @param {String} template spec */ -Ember.Handlebars.template = function(spec){ +Ember.Handlebars.template = function(spec) { var t = Handlebars.template(spec); t.isTop = true; return t;
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-handlebars/lib/helpers/binding.js
@@ -13,7 +13,7 @@ var forEach = Ember.ArrayPolyfills.forEach; var EmberHandlebars = Ember.Handlebars, helpers = EmberHandlebars.helpers; -function exists(value){ +function exists(value) { return !Ember.isNone(value); } @@ -363,7 +363,7 @@ EmberHandlebars.registerHelper('unless', function(context, options) { ```javascript AView = Ember.View.extend({ - someProperty: function(){ + someProperty: function() { return "aValue"; }.property() })
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-handlebars/lib/helpers/collection.js
@@ -185,7 +185,7 @@ Ember.Handlebars.registerHelper('collection', function(path, options) { if (hash.hasOwnProperty(prop)) { match = prop.match(/^item(.)(.*)$/); - if(match && prop !== 'itemController') { + if (match && prop !== 'itemController') { // Convert itemShouldFoo -> shouldFoo itemHash[match[1].toLowerCase() + match[2]] = hash[prop]; // Delete from hash as this will end up getting passed to the @@ -212,7 +212,7 @@ Ember.Handlebars.registerHelper('collection', function(path, options) { } if (emptyViewClass) { hash.emptyView = emptyViewClass; } - if(!hash.keyword){ + if (!hash.keyword) { itemHash._context = Ember.computed.alias('content'); }
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-handlebars/lib/helpers/each.js
@@ -288,7 +288,7 @@ GroupedEach.prototype = { ```javascript App.DeveloperController = Ember.ObjectController.extend({ - isAvailableForHire: function(){ + isAvailableForHire: function() { return !this.get('content.isEmployed') && this.get('content.isSeekingWork'); }.property('isEmployed', 'isSeekingWork') })
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-handlebars/lib/helpers/unbound.js
@@ -32,7 +32,7 @@ var handlebarsGet = Ember.Handlebars.get; Ember.Handlebars.registerHelper('unbound', function(property, fn) { var options = arguments[arguments.length - 1], helper, context, out; - if(arguments.length > 2) { + if (arguments.length > 2) { // Unbound helper call. options.data.isUnbound = true; helper = Ember.Handlebars.helpers[arguments[0]] || Ember.Handlebars.helperMissing;
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-handlebars/tests/controls/select_test.js
@@ -231,7 +231,7 @@ test("multiple selections can be set when multiple=true", function() { Ember.run(function() { select.set('selection', Ember.A([tom, brennain])); }); deepEqual( - select.$(':selected').map(function(){ return trim(Ember.$(this).text());}).toArray(), + select.$(':selected').map(function() { return trim(Ember.$(this).text());}).toArray(), ['Tom', 'Brennain'], "After changing it, selection should be correct"); }); @@ -259,7 +259,7 @@ test("multiple selections can be set by changing in place the selection array wh }); deepEqual( - select.$(':selected').map(function(){ return trim(Ember.$(this).text());}).toArray(), + select.$(':selected').map(function() { return trim(Ember.$(this).text());}).toArray(), ['David', 'Brennain'], "After updating the selection array in-place, selection should be correct"); }); @@ -676,12 +676,12 @@ test("works from a template with bindings", function() { equal(select.$().text(), "Pick a person:Yehuda KatzTom DalePeter WagenetErik Bryn", "Option values were rendered"); equal(select.get('selection'), null, "Nothing has been selected"); - Ember.run(function(){ + Ember.run(function() { application.selectedPersonController.set('person', erik); }); equal(select.get('selection'), erik, "Selection was updated through binding"); - Ember.run(function(){ + Ember.run(function() { application.peopleController.pushObject(Person.create({id: 5, firstName: "James", lastName: "Rosen"})); });
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-handlebars/tests/handlebars_test.js
@@ -713,7 +713,7 @@ test("edge case: child conditional should not render children if parent conditio test("Template views return throw if their template cannot be found", function() { view = Ember.View.create({ templateName: 'cantBeFound', - container: { lookup: function(){ }} + container: { lookup: function() { }} }); expectAssertion(function() { @@ -804,7 +804,7 @@ test("views make a view keyword available that allows template to reference view equal(view.$('h1').text(), "Brodele del Heeeyyyyyy", "renders properties from parent context"); }); -test("a view helper's bindings are to the parent context", function(){ +test("a view helper's bindings are to the parent context", function() { var Subview = Ember.View.extend({ classNameBindings: ['color'], controller: Ember.Object.create({ @@ -1046,7 +1046,7 @@ test("should not update boundIf if truthiness does not change", function() { equal(view.$('#first').text(), "bam", "renders block when condition is true"); }); -test("boundIf should support parent access", function(){ +test("boundIf should support parent access", function() { view = Ember.View.create({ template: Ember.Handlebars.compile( '<h1 id="first">{{#with view.content}}{{#with thankYou}}'+ @@ -1720,7 +1720,7 @@ test("should be able to bindAttr to var in {{#each var in list}} block", functio ok(/three\.gif$/.test(images[1].src)); }); -test("should be able to output a property without binding", function(){ +test("should be able to output a property without binding", function() { var context = { content: Ember.Object.create({ anUnboundString: "No spans here, son." @@ -1974,7 +1974,7 @@ module("Ember.View - handlebars integration", { } }); -test("should be able to log a property", function(){ +test("should be able to log a property", function() { var context = { value: 'one', valueTwo: 'two', @@ -2022,36 +2022,36 @@ test("should be able to log `this`", function() { var MyApp; module("Templates redrawing and bindings", { - setup: function(){ + setup: function() { Ember.lookup = lookup = { Ember: Ember }; MyApp = lookup.MyApp = Ember.Object.create({}); }, - teardown: function(){ + teardown: function() { Ember.run(function() { if (view) view.destroy(); }); Ember.lookup = originalLookup; } }); -test("should be able to update when bound property updates", function(){ +test("should be able to update when bound property updates", function() { MyApp.set('controller', Ember.Object.create({name: 'first'})); var View = Ember.View.extend({ template: Ember.Handlebars.compile('<i>{{view.value.name}}, {{view.computed}}</i>'), valueBinding: 'MyApp.controller', - computed: Ember.computed(function(){ + computed: Ember.computed(function() { return this.get('value.name') + ' - computed'; }).property('value') }); - Ember.run(function(){ + Ember.run(function() { view = View.create(); }); appendView(); - Ember.run(function(){ + Ember.run(function() { MyApp.set('controller', Ember.Object.create({ name: 'second' })); @@ -2061,7 +2061,7 @@ test("should be able to update when bound property updates", function(){ equal(view.$('i').text(), 'second, second - computed', "view rerenders when bound properties change"); }); -test("properties within an if statement should not fail on re-render", function(){ +test("properties within an if statement should not fail on re-render", function() { view = Ember.View.create({ template: Ember.Handlebars.compile('{{#if view.value}}{{view.value}}{{/if}}'), value: null @@ -2071,20 +2071,20 @@ test("properties within an if statement should not fail on re-render", function( equal(view.$().text(), ''); - Ember.run(function(){ + Ember.run(function() { view.set('value', 'test'); }); equal(view.$().text(), 'test'); - Ember.run(function(){ + Ember.run(function() { view.set('value', null); }); equal(view.$().text(), ''); }); -test("views within an if statement should be sane on re-render", function(){ +test("views within an if statement should be sane on re-render", function() { view = Ember.View.create({ template: Ember.Handlebars.compile('{{#if view.display}}{{view Ember.TextField}}{{/if}}'), display: false @@ -2094,7 +2094,7 @@ test("views within an if statement should be sane on re-render", function(){ equal(view.$('input').length, 0); - Ember.run(function(){ + Ember.run(function() { // Setting twice will trigger the observer twice, this is intentional view.set('display', true); view.set('display', 'yes'); @@ -2107,7 +2107,7 @@ test("views within an if statement should be sane on re-render", function(){ ok(Ember.View.views[textfield.attr('id')]); }); -test("the {{this}} helper should not fail on removal", function(){ +test("the {{this}} helper should not fail on removal", function() { view = Ember.View.create({ template: Ember.Handlebars.compile('{{#if view.show}}{{#each view.list}}{{this}}{{/each}}{{/if}}'), show: true, @@ -2118,7 +2118,7 @@ test("the {{this}} helper should not fail on removal", function(){ equal(view.$().text(), 'abc', "should start property - precond"); - Ember.run(function(){ + Ember.run(function() { view.set('show', false); });
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-handlebars/tests/helpers/bound_helper_test.js
@@ -12,7 +12,7 @@ var registerRepeatHelper = function() { Ember.Handlebars.helper('repeat', function(value, options) { var count = options.hash.count; var a = []; - while(a.length < count){ + while(a.length < count) { a.push(value); } return a.join(''); @@ -24,7 +24,7 @@ module("Handlebars bound helpers", { window.TemplateTests = Ember.Namespace.create(); }, teardown: function() { - Ember.run(function(){ + Ember.run(function() { if (view) { view.destroy(); }
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-handlebars/tests/helpers/custom_view_helper_test.js
@@ -11,7 +11,7 @@ module("Handlebars custom view helpers", { window.TemplateTests = Ember.Namespace.create(); }, teardown: function() { - Ember.run(function(){ + Ember.run(function() { if (view) { view.destroy(); }
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-handlebars/tests/helpers/each_test.js
@@ -29,7 +29,7 @@ module("the #each helper", { }, teardown: function() { - Ember.run(function(){ + Ember.run(function() { view.destroy(); view = null; });
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-handlebars/tests/helpers/if_unless_test.js
@@ -8,7 +8,7 @@ var view; module("Handlebars {{#if}} and {{#unless}} helpers", { teardown: function() { - Ember.run(function(){ + Ember.run(function() { if (view) { view.destroy(); }
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-handlebars/tests/helpers/loc_test.js
@@ -12,7 +12,7 @@ var appendView = function(view) { }; var destroyView = function(view) { - Ember.run(function(){ + Ember.run(function() { view.destroy(); }); };
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-handlebars/tests/helpers/partial_test.js
@@ -2,13 +2,13 @@ var MyApp; var originalLookup = Ember.lookup, lookup, TemplateTests, view, container; module("Support for {{partial}} helper", { - setup: function(){ + setup: function() { Ember.lookup = lookup = { Ember: Ember }; MyApp = lookup.MyApp = Ember.Object.create({}); container = new Ember.Container(); container.optionsForType('template', { instantiate: false }); }, - teardown: function(){ + teardown: function() { Ember.run(function() { if (view) { view.destroy(); @@ -48,7 +48,7 @@ test("should render other slash-separated templates registered with the containe equal(Ember.$.trim(view.$().text()), "This sub-template is pretty great."); }); -test("should use the current view's context", function(){ +test("should use the current view's context", function() { container.register('template:_person_name', Ember.Handlebars.compile("{{firstName}} {{lastName}}")); view = Ember.View.create({
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-handlebars/tests/helpers/template_test.js
@@ -2,13 +2,13 @@ var MyApp; var originalLookup = Ember.lookup, lookup, TemplateTests, view, container; module("Support for {{template}} helper", { - setup: function(){ + setup: function() { Ember.lookup = lookup = { Ember: Ember }; MyApp = lookup.MyApp = Ember.Object.create({}); container = new Ember.Container(); container.optionsForType('template', { instantiate: false }); }, - teardown: function(){ + teardown: function() { Ember.run(function() { if (view) { view.destroy(); @@ -33,7 +33,7 @@ test("should render other templates via the container", function() { equal(Ember.$.trim(view.$().text()), "This sub-template is pretty great."); }); -test("should use the current view's context", function(){ +test("should use the current view's context", function() { container.register('template:person_name', Ember.Handlebars.compile("{{firstName}} {{lastName}}")); view = Ember.View.create({
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-handlebars/tests/helpers/unbound_test.js
@@ -25,7 +25,7 @@ module("Handlebars {{#unbound}} helper -- classic single-property usage", { }, teardown: function() { - Ember.run(function(){ + Ember.run(function() { view.destroy(); }); Ember.lookup = originalLookup; @@ -66,7 +66,7 @@ module("Handlebars {{#unbound boundHelper arg1 arg2... argN}} form: render unbou }, teardown: function() { - Ember.run(function(){ + Ember.run(function() { view.destroy(); }); Ember.lookup = originalLookup; @@ -79,7 +79,7 @@ test("should be able to render an unbound helper invocation", function() { Ember.Handlebars.registerBoundHelper('repeat', function(value, options) { var count = options.hash.count; var a = []; - while(a.length < count){ + while(a.length < count) { a.push(value); } return a.join('');
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-handlebars/tests/helpers/view_test.js
@@ -1,10 +1,10 @@ var view, originalLookup; var container = { - lookupFactory: function(){ } + lookupFactory: function() { } }; -function viewClass(options){ +function viewClass(options) { options.container = options.container || container; return Ember.View.extend(options); } @@ -22,7 +22,7 @@ module("Handlebars {{#view}} helper", { }); -test("View lookup - App.FuView", function(){ +test("View lookup - App.FuView", function() { Ember.lookup = { App: { FuView: viewClass({ @@ -41,7 +41,7 @@ test("View lookup - App.FuView", function(){ equal(Ember.$('#fu').text(), 'bro'); }); -test("View lookup - 'App.FuView'", function(){ +test("View lookup - 'App.FuView'", function() { Ember.lookup = { App: { FuView: viewClass({ @@ -60,7 +60,7 @@ test("View lookup - 'App.FuView'", function(){ equal(Ember.$('#fu').text(), 'bro'); }); -test("View lookup - 'fu'", function(){ +test("View lookup - 'fu'", function() { var FuView = viewClass({ elementId: "fu", template: Ember.Handlebars.compile("bro")
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-handlebars/tests/helpers/with_test.js
@@ -23,7 +23,7 @@ module("Handlebars {{#with}} helper", { }, teardown: function() { - Ember.run(function(){ + Ember.run(function() { view.destroy(); }); Ember.lookup = originalLookup; @@ -73,7 +73,7 @@ module("Handlebars {{#with}} globals helper", { }, teardown: function() { - Ember.run(function(){ + Ember.run(function() { view.destroy(); }); Ember.lookup = originalLookup;
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-handlebars/tests/helpers/yield_test.js
@@ -12,7 +12,7 @@ module("Support for {{yield}} helper (#307)", { container.optionsForType('template', { instantiate: false }); }, teardown: function() { - Ember.run(function(){ + Ember.run(function() { if (view) { view.destroy(); }}
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-handlebars/tests/views/collection_view_test.js
@@ -17,7 +17,7 @@ module("ember-handlebars/tests/views/collection_view_test", { lookup.TemplateTests = TemplateTests = Ember.Namespace.create(); }, teardown: function() { - Ember.run(function(){ + Ember.run(function() { if (view) { view.destroy(); } @@ -102,7 +102,7 @@ test("empty views should be removed when content is added to the collection (reg equal(view.$('tr').length, 1, 'has one row'); equal(view.$('tr:nth-child(1) td').text(), 'Go Away, Placeholder Row!', 'The content is the updated data.'); - Ember.run(function(){ App.destroy(); }); + Ember.run(function() { App.destroy(); }); }); test("should be able to specify which class should be used for the empty view", function() { @@ -297,7 +297,7 @@ test("should give its item views the property specified by itemPropertyBinding", equal(view.$('ul li').length, 3, "adds 3 itemView"); - view.$('ul li').each(function(i, li){ + view.$('ul li').each(function(i, li) { equal(Ember.$(li).text(), "baz", "creates the li with the property = baz"); }); @@ -544,10 +544,10 @@ test("should allow view objects to be swapped out without throwing an error (#78 }); }); -test("context should be content", function(){ +test("context should be content", function() { var App, view; - Ember.run(function(){ + Ember.run(function() { lookup.App = App = Ember.Application.create(); }); @@ -565,17 +565,17 @@ test("context should be content", function(){ template: Ember.Handlebars.compile('{{collection contentBinding="App.items" itemViewClass="App.AnItemView"}}') }); - Ember.run(function(){ + Ember.run(function() { view = App.AView.create(); }); - Ember.run(function(){ + Ember.run(function() { view.appendTo('#qunit-fixture'); }); equal(view.$().text(), "Greetings DaveGreetings MaryGreetings Sara"); - Ember.run(function(){ + Ember.run(function() { view.destroy(); App.destroy(); });
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-handlebars/tests/views/metamorph_view_test.js
@@ -11,7 +11,7 @@ module("Metamorph views", { }, teardown: function() { - Ember.run(function(){ + Ember.run(function() { view.destroy(); if (childView && !childView.isDestroyed) { childView.destroy(); @@ -75,7 +75,7 @@ module("Metamorph views correctly handle DOM", { }, teardown: function() { - Ember.run(function(){ + Ember.run(function() { view.destroy(); if (!metamorphView.isDestroyed) { metamorphView.destroy(); @@ -114,7 +114,7 @@ test("a metamorph view can be rerendered", function() { // Redefining without setup/teardown module("Metamorph views correctly handle DOM"); -test("a metamorph view calls its childrens' willInsertElement and didInsertElement", function(){ +test("a metamorph view calls its childrens' willInsertElement and didInsertElement", function() { var parentView; var willInsertElementCalled = false; var didInsertElementCalled = false; @@ -124,10 +124,10 @@ test("a metamorph view calls its childrens' willInsertElement and didInsertEleme ViewWithCallback: Ember.View.extend({ template: Ember.Handlebars.compile('<div id="do-i-exist"></div>'), - willInsertElement: function(){ + willInsertElement: function() { willInsertElementCalled = true; }, - didInsertElement: function(){ + didInsertElement: function() { didInsertElementCalled = true; didInsertElementSawElement = (this.$('div').length === 1); } @@ -148,7 +148,7 @@ test("a metamorph view calls its childrens' willInsertElement and didInsertEleme ok(didInsertElementCalled, "didInsertElement called"); ok(didInsertElementSawElement, "didInsertElement saw element"); - Ember.run(function(){ + Ember.run(function() { parentView.destroy(); }); @@ -173,22 +173,22 @@ test("replacing a Metamorph should invalidate childView elements", function() { elementOnDidChange = this.get('element'); }, 'element'), - didInsertElement: function(){ + didInsertElement: function() { elementOnDidInsert = this.get('element'); } }), template: Ember.Handlebars.compile("{{#if view.show}}{{view view.CustomView}}{{/if}}") }); - Ember.run(function(){ view.append(); }); + Ember.run(function() { view.append(); }); - Ember.run(function(){ view.set('show', true); }); + Ember.run(function() { view.set('show', true); }); ok(elementOnDidChange, "should have an element on change"); ok(elementOnDidInsert, "should have an element on insert"); - Ember.run(function(){ view.destroy(); }); + Ember.run(function() { view.destroy(); }); }); test("trigger rerender of parent and SimpleHandlebarsView", function () { @@ -198,11 +198,11 @@ test("trigger rerender of parent and SimpleHandlebarsView", function () { template: Ember.Handlebars.compile("{{#if view.show}}{{#if view.foo}}{{view.foo}}{{/if}}{{/if}}") }); - Ember.run(function(){ view.append(); }); + Ember.run(function() { view.append(); }); equal(view.$().text(), 'bar'); - Ember.run(function(){ + Ember.run(function() { view.set('foo', 'baz'); // schedule render of simple bound view.set('show', false); // destroy tree }); @@ -222,11 +222,11 @@ test("re-rendering and then changing the property does not raise an exception", template: Ember.Handlebars.compile("{{#view view.metamorphView}}truth{{/view}}") }); - Ember.run(function(){ view.appendTo('#qunit-fixture'); }); + Ember.run(function() { view.appendTo('#qunit-fixture'); }); equal(view.$().text(), 'truth'); - Ember.run(function(){ + Ember.run(function() { view.get('_childViews')[0].rerender(); view.get('_childViews')[0].rerender(); });
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-metal/lib/computed.js
@@ -402,7 +402,7 @@ Ember.computed = function(func) { func = a_slice.call(arguments, -1)[0]; } - if ( typeof func !== "function" ) { + if (typeof func !== "function") { throw new Error("Computed Property declared without a property function"); } @@ -670,7 +670,7 @@ registerComputedWithProperties('map', function(properties) { alias to the original value for property. */ Ember.computed.alias = function(dependentKey) { - return Ember.computed(dependentKey, function(key, value){ + return Ember.computed(dependentKey, function(key, value) { if (arguments.length > 1) { set(this, dependentKey, value); return value;
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-metal/lib/core.js
@@ -176,7 +176,7 @@ function assertPolyfill(test, message) { // attempt to preserve the stack throw new Error("assertion failed: " + message); } catch(error) { - setTimeout(function(){ + setTimeout(function() { throw error; }, 0); } @@ -258,7 +258,7 @@ Ember.merge = function(original, updates) { Ember.isNone(undefined); // true Ember.isNone(''); // false Ember.isNone([]); // false - Ember.isNone(function(){}); // false + Ember.isNone(function() {}); // false ``` @method isNone
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-metal/lib/instrumentation.js
@@ -92,7 +92,7 @@ Ember.Instrumentation.instrument = function(name, payload, callback, binding) { var beforeValues = [], listener, i, l; - function tryable(){ + function tryable() { for (i=0, l=listeners.length; i<l; i++) { listener = listeners[i]; beforeValues[i] = listener.before(name, time(), payload); @@ -101,7 +101,7 @@ Ember.Instrumentation.instrument = function(name, payload, callback, binding) { return callback.call(binding); } - function catchable(e){ + function catchable(e) { payload = payload || {}; payload.exception = e; }
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-metal/lib/mixin.js
@@ -575,7 +575,7 @@ Alias.prototype = new Ember.Descriptor(); App.PaintSample = Ember.Object.extend({ color: 'red', colour: Ember.alias('color'), - name: function(){ + name: function() { return "Zed"; }, moniker: Ember.alias("name") @@ -603,7 +603,7 @@ Ember.alias = Ember.deprecateFunc("Ember.alias is deprecated. Please use Ember.a ```javascript App.Person = Ember.Object.extend({ - name: function(){ + name: function() { return 'Tomhuda Katzdale'; }, moniker: Ember.aliasMethod('name') @@ -672,7 +672,7 @@ Ember.immediateObserver = function() { }.observesBefore('content.value'), valueDidChange: function(obj, keyName, value) { // only run if updating a value already in the DOM - if(this.get('state') === 'inDOM') { + if (this.get('state') === 'inDOM') { var color = value > this.changingFrom ? 'green' : 'red'; // logic }
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-metal/lib/platform.js
@@ -60,7 +60,7 @@ var canRedefineProperties, canDefinePropertyOnDOM; // Catch IE8 where Object.defineProperty exists but only works on DOM elements if (defineProperty) { try { - defineProperty({}, 'a',{get:function(){}}); + defineProperty({}, 'a',{get:function() {}}); } catch (e) { defineProperty = null; } @@ -91,7 +91,7 @@ if (defineProperty) { // This is for Safari 5.0, which supports Object.defineProperty, but not // on DOM nodes. - canDefinePropertyOnDOM = (function(){ + canDefinePropertyOnDOM = (function() { try { defineProperty(document.createElement('div'), 'definePropertyOnDOM', {}); return true; @@ -103,7 +103,7 @@ if (defineProperty) { if (!canRedefineProperties) { defineProperty = null; } else if (!canDefinePropertyOnDOM) { - defineProperty = function(obj, keyName, desc){ + defineProperty = function(obj, keyName, desc) { var isNode; if (typeof Node === "object") {
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-metal/lib/property_events.js
@@ -182,7 +182,7 @@ var endPropertyChanges = Ember.endPropertyChanges = function() { @param {Function} callback @param [binding] */ -Ember.changeProperties = function(cb, binding){ +Ember.changeProperties = function(cb, binding) { beginPropertyChanges(); tryFinally(cb, endPropertyChanges, binding); }; @@ -210,4 +210,4 @@ var notifyObservers = function(obj, keyName) { } else { sendEvent(obj, eventName, [obj, keyName]); } -}; \ No newline at end of file +};
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-metal/lib/run_loop.js
@@ -35,7 +35,7 @@ var Backburner = requireModule('backburner').Backburner, call. ```javascript - Ember.run(function(){ + Ember.run(function() { // code to be execute within a RunLoop }); ``` @@ -78,17 +78,17 @@ Ember.run = function(target, method) { If invoked when not within a run loop: ```javascript - Ember.run.join(function(){ + Ember.run.join(function() { // creates a new run-loop }); ``` Alternatively, if called within an existing run loop: ```javascript - Ember.run(function(){ + Ember.run(function() { // creates a new run-loop - Ember.run.join(function(){ + Ember.run.join(function() { // joins with the existing run-loop, and queues for invocation on // the existing run-loops action queue. }); @@ -181,12 +181,12 @@ Ember.run.end = function() { the `Ember.run.queues` property. ```javascript - Ember.run.schedule('sync', this, function(){ + Ember.run.schedule('sync', this, function() { // this will be executed in the first RunLoop queue, when bindings are synced console.log("scheduled on sync queue"); }); - Ember.run.schedule('actions', this, function(){ + Ember.run.schedule('actions', this, function() { // this will be executed in the 'actions' queue, after bindings have synced. console.log("scheduled on actions queue"); }); @@ -254,7 +254,7 @@ Ember.run.sync = function() { together, which is often more efficient than using a real setTimeout. ```javascript - Ember.run.later(myContext, function(){ + Ember.run.later(myContext, function() { // code here will execute within a RunLoop in about 500ms with this == myContext }, 500); ``` @@ -302,7 +302,7 @@ Ember.run.once = function(target, method) { calls. ```javascript - Ember.run(function(){ + Ember.run(function() { var sayHi = function() { console.log('hi'); } Ember.run.scheduleOnce('afterRender', myContext, sayHi); Ember.run.scheduleOnce('afterRender', myContext, sayHi); @@ -347,7 +347,7 @@ Ember.run.scheduleOnce = function(queue, target, method) { `Ember.run.later` with a wait time of 1ms. ```javascript - Ember.run.next(myContext, function(){ + Ember.run.next(myContext, function() { // code to be executed in the next run loop, which will be scheduled after the current one }); ``` @@ -409,17 +409,17 @@ Ember.run.next = function() { `Ember.run.once()`, or `Ember.run.next()`. ```javascript - var runNext = Ember.run.next(myContext, function(){ + var runNext = Ember.run.next(myContext, function() { // will not be executed }); Ember.run.cancel(runNext); - var runLater = Ember.run.later(myContext, function(){ + var runLater = Ember.run.later(myContext, function() { // will not be executed }, 500); Ember.run.cancel(runLater); - var runOnce = Ember.run.once(myContext, function(){ + var runOnce = Ember.run.once(myContext, function() { // will not be executed }); Ember.run.cancel(runOnce);
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-metal/lib/set_properties.js
@@ -15,10 +15,10 @@ var changeProperties = Ember.changeProperties, @return self */ Ember.setProperties = function(self, hash) { - changeProperties(function(){ + changeProperties(function() { for(var prop in hash) { if (hash.hasOwnProperty(prop)) { set(self, prop, hash[prop]); } } }); return self; -}; \ No newline at end of file +};
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-metal/lib/utils.js
@@ -452,7 +452,7 @@ if (needsFinallyFix) { } finally { try { finalResult = finalizer.call(binding); - } catch (e){ + } catch (e) { finalError = e; } } @@ -504,7 +504,7 @@ if (needsFinallyFix) { } finally { try { finalResult = finalizer.call(binding); - } catch (e){ + } catch (e) { finalError = e; } }
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-metal/tests/accessors/get_test.js
@@ -36,14 +36,14 @@ testBoth("should call unknownProperty on watched values if the value is undefine equal(get(obj, 'foo'), 'FOO', 'should return value from unknown'); }); -test('warn on attempts to get a property of undefined', function(){ +test('warn on attempts to get a property of undefined', function() { expectAssertion(function() { Ember.get(undefined, 'aProperty'); }, /Cannot call get with 'aProperty' on an undefined object/i); }); -test('warn on attempts to get a property path of undefined', function(){ - expectAssertion(function(){ +test('warn on attempts to get a property path of undefined', function() { + expectAssertion(function() { Ember.get(undefined, 'aProperty.on.aPath'); }, /Cannot call get with 'aProperty.on.aPath' on an undefined object/); });
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-metal/tests/accessors/isGlobalPath_test.js
@@ -1,16 +1,16 @@ module('Ember.isGlobalPath'); -test("global path's are recognized", function(){ +test("global path's are recognized", function() { ok( Ember.isGlobalPath('App.myProperty') ); ok( Ember.isGlobalPath('App.myProperty.subProperty') ); }); -test("if there is a 'this' in the path, it's not a global path", function(){ +test("if there is a 'this' in the path, it's not a global path", function() { ok( !Ember.isGlobalPath('this.myProperty') ); ok( !Ember.isGlobalPath('this') ); }); -test("if the path starts with a lowercase character, it is not a global path", function(){ +test("if the path starts with a lowercase character, it is not a global path", function() { ok( !Ember.isGlobalPath('myObj') ); ok( !Ember.isGlobalPath('myObj.SecondProperty') ); -}); \ No newline at end of file +});
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-metal/tests/binding/connect_test.js
@@ -3,7 +3,7 @@ require('ember-metal/~tests/props_helper'); function performTest(binding, a, b, get, set, connect) { - if (connect === undefined) connect = function(){binding.connect(a);}; + if (connect === undefined) connect = function() {binding.connect(a);}; ok(!Ember.run.currentRunLoop, 'performTest should not have a currentRunLoop'); @@ -64,7 +64,7 @@ testBoth('Connecting a binding to path', function(get, set) { // make sure modifications update b = { bar: 'BIFF' }; - Ember.run(function(){ + Ember.run(function() { set(GlobalB, 'b', b); });
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-metal/tests/binding/oneWay_test.js
@@ -15,21 +15,21 @@ module('system/mixin/binding/oneWay_test', { test('oneWay(true) should only sync one way', function() { var binding; - Ember.run(function(){ + Ember.run(function() { binding = Ember.oneWay(MyApp, 'bar.value', 'foo.value'); }); equal(Ember.get('MyApp.foo.value'), 'FOO', 'foo synced'); equal(Ember.get('MyApp.bar.value'), 'FOO', 'bar synced'); - Ember.run(function(){ + Ember.run(function() { Ember.set('MyApp.bar.value', 'BAZ'); }); equal(Ember.get('MyApp.foo.value'), 'FOO', 'foo synced'); equal(Ember.get('MyApp.bar.value'), 'BAZ', 'bar not synced'); - Ember.run(function(){ + Ember.run(function() { Ember.set('MyApp.foo.value', 'BIFF'); });
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-metal/tests/computed_test.js
@@ -531,9 +531,9 @@ testBoth('depending on Global chain', function(get, set) { }); -testBoth('chained dependent keys should evaluate computed properties lazily', function(get,set){ +testBoth('chained dependent keys should evaluate computed properties lazily', function(get,set) { Ember.defineProperty(obj.foo.bar, 'b', Ember.computed(func)); - Ember.defineProperty(obj.foo, 'c', Ember.computed(function(){}).property('bar.b')); + Ember.defineProperty(obj.foo, 'c', Ember.computed(function() {}).property('bar.b')); equal(count, 0, 'b should not run'); }); @@ -678,7 +678,7 @@ testBoth("when setting a value on a computed property that doesn't handle sets", module('Ember.computed - readOnly'); test('is chainable', function() { - var computed = Ember.computed(function(){}).readOnly(); + var computed = Ember.computed(function() {}).readOnly(); ok(computed instanceof Ember.Descriptor); ok(computed instanceof Ember.ComputedProperty); @@ -687,13 +687,13 @@ test('is chainable', function() { testBoth('protects against setting', function(get, set) { var obj = { }; - Ember.defineProperty(obj, 'bar', Ember.computed(function(key){ + Ember.defineProperty(obj, 'bar', Ember.computed(function(key) { return 'barValue'; }).readOnly()); equal(get(obj, 'bar'), 'barValue'); - raises(function(){ + raises(function() { set(obj, 'bar', 'newBar'); }, /Cannot Set: bar on:/ ); @@ -730,7 +730,7 @@ testBoth('Ember.computed.empty', function(get, set) { }); testBoth('Ember.computed.bool', function(get, set) { - var obj = {foo: function(){}, bar: 'asdf', baz: null, quz: false}; + var obj = {foo: function() {}, bar: 'asdf', baz: null, quz: false}; Ember.defineProperty(obj, 'fooBool', Ember.computed.bool('foo')); Ember.defineProperty(obj, 'barBool', Ember.computed.bool('bar')); Ember.defineProperty(obj, 'bazBool', Ember.computed.bool('baz')); @@ -743,7 +743,7 @@ testBoth('Ember.computed.bool', function(get, set) { testBoth('Ember.computed.alias', function(get, set) { var obj = { bar: 'asdf', baz: null, quz: false}; - Ember.defineProperty(obj, 'bay', Ember.computed(function(key){ + Ember.defineProperty(obj, 'bay', Ember.computed(function(key) { return 'apple'; }));
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-metal/tests/mixin/alias_method_test.js
@@ -19,7 +19,7 @@ test('methods of another name are aliased when the mixin is applied', function() test('should follow aliasMethods all the way down', function() { var MyMixin = Ember.Mixin.create({ bar: Ember.aliasMethod('foo'), // put first to break ordered iteration - baz: function(){ return 'baz'; }, + baz: function() { return 'baz'; }, foo: Ember.aliasMethod('baz') });
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-metal/tests/mixin/alias_test.js
@@ -1,8 +1,8 @@ module('Ember.alias',{ - setup: function(){ + setup: function() { Ember.TESTING_DEPRECATION = true; }, - teardown: function(){ + teardown: function() { Ember.TESTING_DEPRECATION = false; } });
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-metal/tests/observer_test.js
@@ -220,7 +220,7 @@ testBoth('deferring property change notifications safely despite exceptions', fu Ember.addObserver(obj, 'foo' ,function() { fooCount++; }); try { - Ember.changeProperties(function(){ + Ember.changeProperties(function() { set(obj, 'foo', 'BIFF'); set(obj, 'foo', 'BAZ'); throw exc; @@ -232,7 +232,7 @@ testBoth('deferring property change notifications safely despite exceptions', fu equal(fooCount, 1, 'foo should have fired once'); - Ember.changeProperties(function(){ + Ember.changeProperties(function() { set(obj, 'foo', 'BIFF2'); set(obj, 'foo', 'BAZ2'); }); @@ -297,7 +297,7 @@ testBoth('addObserver should propagate through prototype', function(get,set) { equal(obj2.count, 0, 'should not have invoked observer on inherited'); }); -testBoth('addObserver should respect targets with methods', function(get,set){ +testBoth('addObserver should respect targets with methods', function(get,set) { var observed = { foo: 'foo' }; var target1 = { @@ -410,7 +410,7 @@ testBoth('local observers can be removed', function(get, set) { equal(barObserved, 1, 'removed observers should not be called'); }); -testBoth('removeObserver should respect targets with methods', function(get,set){ +testBoth('removeObserver should respect targets with methods', function(get,set) { var observed = { foo: 'foo' }; var target1 = { @@ -497,7 +497,7 @@ testBoth('addBeforeObserver should propagate through prototype', function(get,se equal(obj2.count, 0, 'should not have invoked observer on inherited'); }); -testBoth('addBeforeObserver should respect targets with methods', function(get,set){ +testBoth('addBeforeObserver should respect targets with methods', function(get,set) { var observed = { foo: 'foo' }; var target1 = { @@ -616,7 +616,7 @@ testBoth('depending on a simple chain', function(get, set) { testBoth('depending on a Global chain', function(get, set) { var Global = lookup.Global, val; - Ember.addObserver(obj, 'Global.foo.bar.baz.biff', function(target, key){ + Ember.addObserver(obj, 'Global.foo.bar.baz.biff', function(target, key) { val = Ember.get(lookup, key); count++; });
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-metal/tests/run_loop/debounce_test.js
@@ -1,16 +1,16 @@ var originalDebounce = Ember.run.backburner.debounce; var wasCalled = false; module('Ember.run.debounce',{ - setup: function(){ - Ember.run.backburner.debounce = function(){ wasCalled = true; }; + setup: function() { + Ember.run.backburner.debounce = function() { wasCalled = true; }; }, - teardown: function(){ + teardown: function() { Ember.run.backburner.debounce = originalDebounce; } }); -test('Ember.run.debounce uses Backburner.debounce', function(){ - Ember.run.debounce(function(){}); +test('Ember.run.debounce uses Backburner.debounce', function() { + Ember.run.debounce(function() {}); ok(wasCalled, 'Ember.run.debounce used'); });
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-metal/tests/run_loop/join_test.js
@@ -38,7 +38,7 @@ test('Ember.run.join returns undefined if joining another run-loop', function() var value = 'returned value', result; - Ember.run(function(){ + Ember.run(function() { var result = Ember.run.join(function() { return value; });
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-metal/tests/run_loop/unwind_test.js
@@ -3,7 +3,7 @@ module('system/run_loop/unwind_test'); test('RunLoop unwinds despite unhandled exception', function() { var initialRunLoop = Ember.run.currentRunLoop; - raises(function(){ + raises(function() { Ember.run(function() { Ember.run.schedule('actions', function() { throw new Error("boom!"); }); }); @@ -23,7 +23,7 @@ test('RunLoop unwinds despite unhandled exception', function() { test('Ember.run unwinds despite unhandled exception', function() { var initialRunLoop = Ember.run.currentRunLoop; - raises(function(){ + raises(function() { Ember.run(function() { throw new Error("boom!"); });
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-metal/tests/utils/is_array_test.js
@@ -2,7 +2,7 @@ module("Ember Type Checking"); var global = this; -test("Ember.isArray" ,function(){ +test("Ember.isArray" ,function() { var numarray = [1,2,3], number = 23, strarray = ["Hello", "Hi"],
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-metal/tests/utils/try_catch_finally_test.js
@@ -22,7 +22,7 @@ module("Ember.tryFinally", { } }); -function callTryCatchFinallyWithError(){ +function callTryCatchFinallyWithError() { var errorWasThrown; try { Ember.tryCatchFinally(tryable, catchable, finalizer);
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-metal/tests/utils/try_finally_test.js
@@ -17,7 +17,7 @@ module("Ember.tryFinally", { } }); -function callTryFinallyWithError(){ +function callTryFinallyWithError() { var errorWasThrown; try { Ember.tryFinally(tryable, finalizer);
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-old-router/lib/application/system/application.js
@@ -523,7 +523,7 @@ Ember.Application.registerInjection({ var name = property.charAt(0).toLowerCase() + property.substr(1), controllerClass = app[property], controller; - if(!Ember.Object.detect(controllerClass)){ return; } + if (!Ember.Object.detect(controllerClass)) { return; } controller = app[property].create(); router.set(name, controller);
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-old-router/lib/helpers/action.js
@@ -84,7 +84,7 @@ ActionHelper.registerAction = function(actionName, options) { ```javascript AView = Ember.View.extend({ templateName: 'a-template', - anActionName: function(event){} + anActionName: function(event) {} }); aView = AView.create(); @@ -210,7 +210,7 @@ ActionHelper.registerAction = function(actionName, options) { AView = Ember.View.extend({ templateName; 'a-template', // note: no method 'aMethodNameThatIsMissing' - anActionName: function(event){} + anActionName: function(event) {} }); aView = AView.create();
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-old-router/lib/location/history_location.js
@@ -117,7 +117,7 @@ Ember.HistoryLocation = Ember.Object.extend({ var guid = Ember.guidFor(this); Ember.$(window).on('popstate.ember-location-'+guid, function(e) { - if(!popstateReady) { + if (!popstateReady) { return; } callback(location.pathname);
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-old-router/tests/application_test.js
@@ -3,7 +3,7 @@ var app; module("Ember.Application initialization", { teardown: function() { - Ember.run(function(){ app.destroy(); }); + Ember.run(function() { app.destroy(); }); } });
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-old-router/tests/helpers/action_test.js
@@ -225,7 +225,7 @@ test("should unregister event handlers on rerender", function() { var previousActionId = view.$('a[data-ember-action]').attr('data-ember-action'); - Ember.run(function(){ + Ember.run(function() { view.rerender(); }); @@ -312,7 +312,7 @@ test("should allow 'send' as action name (#594)", function() { view = Ember.View.create({ template: Ember.Handlebars.compile('<a href="#" {{action "send" }}>send</a>'), - send: function(evt){ eventHandlerWasCalled = true; eventObjectSent = evt; } + send: function(evt) { eventHandlerWasCalled = true; eventObjectSent = evt; } }); appendView(); @@ -353,7 +353,7 @@ test("should send the view, event and current Handlebars context to the action", deepEqual(passedEvent.context, aContext, "the context is passed"); equal(passedEvent.type, 'click', "the event passed is the event triggered for the action helper"); - Ember.run(function(){ aTarget.destroy(); }); + Ember.run(function() { aTarget.destroy(); }); }); test("should only trigger actions for the event they were registered on", function() {
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-old-router/tests/location_test.js
@@ -10,12 +10,12 @@ module("Ember.Location, hash implementation", { // make sure the onhashchange event fires stop(); // There are weird issues in FF 3.6 if we pass start itself as the parameter - setTimeout(function(){ start(); }, 1); + setTimeout(function() { start(); }, 1); }, teardown: function() { window.location.hash = ""; - Ember.run(function(){ + Ember.run(function() { locationObject.destroy(); }); }
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-old-router/tests/routable_test.js
@@ -736,7 +736,7 @@ test("urlFor raises an error when route property is not defined", function() { }) }); - expectAssertion(function (){ + expectAssertion(function () { router.urlFor('root.dashboard'); }); });
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-old-router/tests/view_test.js
@@ -23,7 +23,7 @@ test("should load named templates from View.templates", function() { templateName: 'testTemplate' }); - Ember.run(function(){ + Ember.run(function() { view.createElement(); });
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-routing/lib/helpers/link_to.js
@@ -29,7 +29,7 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) { function createPath(path) { var fullPath = 'paramsContext'; - if(path !== '') { + if (path !== '') { fullPath += '.' + path; } return fullPath; @@ -152,11 +152,11 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) { var observer = function(object, path) { var notify = true, i; for(i=0; i < paths.length; i++) { - if(!get(this, paths[i])) { + if (!get(this, paths[i])) { notify = false; } } - if(notify) { + if (notify) { this.notifyPropertyChange('routeArgs'); } }; @@ -411,7 +411,7 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) { the model context of the linked route: ```javascript - App.Router.map(function(){ + App.Router.map(function() { this.resource("photoGallery", {path: "hamster-photos/:photo_id"}); }) ``` @@ -436,8 +436,8 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) { route with the dynamic segments: ```javascript - App.Router.map(function(){ - this.resource("photoGallery", {path: "hamster-photos/:photo_id"}, function(){ + App.Router.map(function() { + this.resource("photoGallery", {path: "hamster-photos/:photo_id"}, function() { this.route("comment", {path: "comments/:comment_id"}); }); });
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-routing/lib/helpers/outlet.js
@@ -86,7 +86,7 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) { } outletSource = options.data.view; - while (!(outletSource.get('template.isTop'))){ + while (!(outletSource.get('template.isTop'))) { outletSource = outletSource.get('_parentView'); }
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-routing/lib/location/history_location.js
@@ -121,7 +121,7 @@ Ember.HistoryLocation = Ember.Object.extend({ get(this, 'history').pushState(state, null, path); // store state if browser doesn't support `history.state` - if(!supportsHistoryState) { + if (!supportsHistoryState) { this._historyState = state; } @@ -143,7 +143,7 @@ Ember.HistoryLocation = Ember.Object.extend({ get(this, 'history').replaceState(state, null, path); // store state if browser doesn't support `history.state` - if(!supportsHistoryState) { + if (!supportsHistoryState) { this._historyState = state; } @@ -166,7 +166,7 @@ Ember.HistoryLocation = Ember.Object.extend({ Ember.$(window).on('popstate.ember-location-'+guid, function(e) { // Ignore initial page load popstate event in Chrome - if(!popstateFired) { + if (!popstateFired) { popstateFired = true; if (self.getURL() === self._previousURL) { return; } }
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-routing/lib/system/route.js
@@ -513,7 +513,7 @@ Ember.Route = Ember.Object.extend({ @method setupController */ - setupController: function(controller, context){ + setupController: function(controller, context) { if (controller && (context !== undefined)) { set(controller, 'model', context); }
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-routing/lib/system/router.js
@@ -298,7 +298,7 @@ function transitionCompleted(route) { Ember.Router.reopenClass({ map: function(callback) { var router = this.router; - if (!router){ + if (!router) { router = this.router = new Router(); router.callbacks = []; } @@ -309,7 +309,7 @@ Ember.Router.reopenClass({ var dsl = Ember.RouterDSL.map(function() { this.resource('application', { path: "/" }, function() { - for (var i=0; i < router.callbacks.length; i++){ + for (var i=0; i < router.callbacks.length; i++) { router.callbacks[i].call(this); } callback.call(this);
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-routing/lib/vendor/route-recognizer.js
@@ -101,7 +101,7 @@ define("route-recognizer", results.push(new StarSegment(match[1])); names.push(match[1]); types.stars++; - } else if(segment === "") { + } else if (segment === "") { results.push(new EpsilonSegment()); } else { results.push(new StaticSegment(segment));
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-routing/tests/helpers/action_test.js
@@ -369,7 +369,7 @@ test("should unregister event handlers on rerender", function() { var previousActionId = view.$('a[data-ember-action]').attr('data-ember-action'); - Ember.run(function(){ + Ember.run(function() { view.rerender(); });
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-routing/tests/helpers/render_test.js
@@ -136,7 +136,7 @@ test("{{render}} helper should raise an error when a given controller name does Ember.TEMPLATES['home'] = compile("<p>BYE</p>"); - expectAssertion(function(){ + expectAssertion(function() { appendView(view); }, 'The controller name you supplied \'postss\' did not resolve to a controller.'); });
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-routing/tests/system/route_test.js
@@ -10,7 +10,7 @@ module("Ember.Route", { } }); -test("default model utilizes the container to acquire the model factory", function(){ +test("default model utilizes the container to acquire the model factory", function() { var container, Post, post; expect(2);
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-runtime/lib/controllers/controller.js
@@ -70,7 +70,7 @@ Ember.ControllerMixin = Ember.Mixin.create({ if (this[actionName]) { Ember.assert("The controller " + this + " does not have the action " + actionName, typeof this[actionName] === 'function'); this[actionName].apply(this, args); - } else if(target = get(this, 'target')) { + } else if (target = get(this, 'target')) { Ember.assert("The target for controller " + this + " (" + target + ") did not define a `send` method", typeof target.send === 'function'); target.send.apply(target, arguments); }
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-runtime/lib/mixins/array.js
@@ -99,7 +99,7 @@ Ember.Array = Ember.Mixin.create(Ember.Enumerable, /** @scope Ember.Array.protot */ objectsAt: function(indexes) { var self = this; - return map(indexes, function(idx){ return self.objectAt(idx); }); + return map(indexes, function(idx) { return self.objectAt(idx); }); }, // overrides Ember.Enumerable version @@ -131,7 +131,7 @@ Ember.Array = Ember.Mixin.create(Ember.Enumerable, /** @scope Ember.Array.protot }), // optimized version from Enumerable - contains: function(obj){ + contains: function(obj) { return this.indexOf(obj) >= 0; },
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-runtime/lib/mixins/deferred.js
@@ -53,7 +53,7 @@ Ember.DeferredMixin = Ember.Mixin.create({ deferred = get(this, '_deferred'); promise = deferred.promise; - if (value === this){ + if (value === this) { deferred.resolve(promise); } else { deferred.resolve(value);
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-runtime/lib/mixins/enumerable.js
@@ -698,7 +698,7 @@ Ember.Enumerable = Ember.Mixin.create({ */ uniq: function() { var ret = Ember.A(); - this.forEach(function(k){ + this.forEach(function(k) { if (a_indexOf(ret, k)<0) ret.push(k); }); return ret;
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-runtime/lib/mixins/mutable_array.js
@@ -163,7 +163,7 @@ Ember.MutableArray = Ember.Mixin.create(Ember.Array, Ember.MutableEnumerable,/** @return {Ember.Array} receiver */ pushObjects: function(objects) { - if(!(Ember.Enumerable.detect(objects) || Ember.isArray(objects))) { + if (!(Ember.Enumerable.detect(objects) || Ember.isArray(objects))) { throw new TypeError("Must pass Ember.Enumerable to Ember.MutableArray#pushObjects"); } this.replace(get(this, 'length'), 0, objects);
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-runtime/lib/mixins/observable.js
@@ -269,7 +269,7 @@ Ember.Observable = Ember.Mixin.create(/** @scope Ember.Observable.prototype */ { @param {String} keyName The property key that is about to change. @return {Ember.Observable} */ - propertyWillChange: function(keyName){ + propertyWillChange: function(keyName) { Ember.propertyWillChange(this, keyName); return this; },
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-runtime/lib/mixins/sortable.js
@@ -60,8 +60,8 @@ Ember.SortableMixin = Ember.Mixin.create(Ember.MutableEnumerable, { return a positive value otherwise: ```javascript - function(x,y){ // These are assumed to be integers - if(x === y) + function(x,y) { // These are assumed to be integers + if (x === y) return 0; return x < y ? -1 : 1; }
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-runtime/lib/mixins/target_action_support.js
@@ -57,7 +57,7 @@ Ember.TargetActionSupport = Ember.Mixin.create({ target: Ember.computed.alias('controller'), action: 'save', actionContext: Ember.computed.alias('context'), - click: function(){ + click: function() { this.triggerAction(); // Sends the `save` action, along with the current context // to the current controller } @@ -69,7 +69,7 @@ Ember.TargetActionSupport = Ember.Mixin.create({ ```javascript App.SaveButtonView = Ember.View.extend(Ember.TargetActionSupport, { - click: function(){ + click: function() { this.triggerAction({ action: 'save', target: this.get('controller'), @@ -87,7 +87,7 @@ Ember.TargetActionSupport = Ember.Mixin.create({ ```javascript App.SaveButtonView = Ember.View.extend(Ember.TargetActionSupport, { target: Ember.computed.alias('controller'), - click: function(){ + click: function() { this.triggerAction({ action: 'save' }); // Sends the `save` action, along with a reference to `this`,
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-runtime/lib/system/array_proxy.js
@@ -278,7 +278,7 @@ Ember.ArrayProxy = Ember.Object.extend(Ember.MutableArray,/** @scope Ember.Array }, pushObjects: function(objects) { - if(!(Ember.Enumerable.detect(objects) || Ember.isArray(objects))) { + if (!(Ember.Enumerable.detect(objects) || Ember.isArray(objects))) { throw new TypeError("Must pass Ember.Enumerable to Ember.MutableArray#pushObjects"); } this._replace(get(this, 'length'), 0, objects);
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-runtime/lib/system/core_object.js
@@ -348,7 +348,7 @@ CoreObject.PrototypeMixin = Mixin.create({ included in the output. App.Teacher = App.Person.extend({ - toStringExtension: function(){ + toStringExtension: function() { return this.get('fullName'); } });
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-runtime/lib/system/native_array.js
@@ -89,7 +89,7 @@ var NativeArray = Ember.Mixin.create(Ember.MutableArray, Ember.Observable, Ember copy: function(deep) { if (deep) { - return this.map(function(item){ return Ember.copy(item, true); }); + return this.map(function(item) { return Ember.copy(item, true); }); } return this.slice(); @@ -130,7 +130,7 @@ Ember.NativeArray = NativeArray; @for Ember @return {Ember.NativeArray} */ -Ember.A = function(arr){ +Ember.A = function(arr) { if (arr === undefined) { arr = []; } return Ember.Array.detect(arr) ? arr : Ember.NativeArray.apply(arr); };
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-runtime/lib/system/set.js
@@ -150,7 +150,7 @@ Ember.Set = Ember.CoreObject.extend(Ember.MutableEnumerable, Ember.Copyable, Emb Ember.propertyWillChange(this, 'firstObject'); Ember.propertyWillChange(this, 'lastObject'); - for (var i=0; i < len; i++){ + for (var i=0; i < len; i++) { guid = guidFor(this[i]); delete this[guid]; delete this[i];
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-runtime/tests/core/error_test.js
@@ -1,9 +1,9 @@ module("Ember Error Throwing"); test("new Ember.Error displays provided message", function() { - raises( function(){ + raises( function() { throw new Ember.Error('A Message'); - }, function(e){ + }, function(e) { return e.message === 'A Message'; }, 'the assigned message was displayed' ); });
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-runtime/tests/core/isEqual_test.js
@@ -12,17 +12,17 @@ test("undefined and null", function() { ok( !Ember.isEqual(null, undefined), "null is not equal to undefined" ); }); -test("strings should be equal",function(){ +test("strings should be equal",function() { ok( !Ember.isEqual("Hello", "Hi"), "different Strings are unequal" ); ok( Ember.isEqual("Hello", "Hello"), "same Strings are equal" ); }); -test("numericals should be equal",function(){ +test("numericals should be equal",function() { ok( Ember.isEqual(24, 24), "same numbers are equal" ); ok( !Ember.isEqual(24, 21), "different numbers are inequal" ); }); -test("array should be equal",function(){ +test("array should be equal",function() { // NOTE: We don't test for array contents -- that would be too expensive. ok( !Ember.isEqual( [1,2], [1,2] ), 'two array instances with the same values should not be equal' ); ok( !Ember.isEqual( [1,2], [1] ), 'two array instances with different values should not be equal' );
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-runtime/tests/core/is_array_test.js
@@ -1,6 +1,6 @@ module("Ember Type Checking"); -test("Ember.isArray" ,function(){ +test("Ember.isArray" ,function() { var arrayProxy = Ember.ArrayProxy.create({ content: Ember.A() }); equal(Ember.isArray(arrayProxy), true, "[]");
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-runtime/tests/ext/mixin_test.js
@@ -8,7 +8,7 @@ test('Defining a property ending in Binding should setup binding when applied', var obj = { bar: { baz: 'BIFF' } }; - Ember.run(function(){ + Ember.run(function() { MyMixin.apply(obj); }); @@ -20,21 +20,21 @@ test('Defining a property ending in Binding should setup binding when applied', test('Defining a property ending in Binding should apply to prototype children', function() { var MyMixin, obj, obj2; - Ember.run(function(){ + Ember.run(function() { MyMixin = Ember.Mixin.create({ fooBinding: 'bar.baz' }); }); obj = { bar: { baz: 'BIFF' } }; - Ember.run(function(){ + Ember.run(function() { MyMixin.apply(obj); }); obj2 = Ember.create(obj); - Ember.run(function(){ + Ember.run(function() { Ember.set(Ember.get(obj2, 'bar'), 'baz', 'BARG'); });
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-runtime/tests/legacy_1x/mixins/observable/observable_test.js
@@ -586,7 +586,7 @@ test("cacheable nested dependent keys should clear after their dependencies upda var DepObj; - Ember.run(function(){ + Ember.run(function() { lookup.DepObj = DepObj = ObservableObject.createWithMixins({ restaurant: ObservableObject.create({ menu: ObservableObject.create({ @@ -602,18 +602,18 @@ test("cacheable nested dependent keys should clear after their dependencies upda equal(DepObj.get('price'), 5, "precond - computed property is correct"); - Ember.run(function(){ + Ember.run(function() { DepObj.set('restaurant.menu.price', 10); }); equal(DepObj.get('price'), 10, "cacheable computed properties are invalidated even if no run loop occurred"); - Ember.run(function(){ + Ember.run(function() { DepObj.set('restaurant.menu.price', 20); }); equal(DepObj.get('price'), 20, "cacheable computed properties are invalidated after a second get before a run loop"); equal(DepObj.get('price'), 20, "precond - computed properties remain correct after a run loop"); - Ember.run(function(){ + Ember.run(function() { DepObj.set('restaurant.menu', ObservableObject.create({ price: 15 })); @@ -622,7 +622,7 @@ test("cacheable nested dependent keys should clear after their dependencies upda equal(DepObj.get('price'), 15, "cacheable computed properties are invalidated after a middle property changes"); - Ember.run(function(){ + Ember.run(function() { DepObj.set('restaurant.menu', ObservableObject.create({ price: 25 })); @@ -659,15 +659,15 @@ module("Observable objects & object properties ", { return ret ; }, - newObserver:function(){ + newObserver:function() { this.abnormal = 'changedValueObserved'; }, - testObserver: Ember.observer(function(){ + testObserver: Ember.observer(function() { this.abnormal = 'removedObserver'; }, 'normal'), - testArrayObserver: Ember.observer(function(){ + testArrayObserver: Ember.observer(function() { this.abnormal = 'notifiedObserver'; }, 'normalArray.[]') @@ -676,7 +676,7 @@ module("Observable objects & object properties ", { }); -test('incrementProperty and decrementProperty',function(){ +test('incrementProperty and decrementProperty',function() { var newValue = object.incrementProperty('numberVal'); equal(25,newValue,'numerical value incremented'); object.numberVal = 24; @@ -702,13 +702,13 @@ test('incrementProperty and decrementProperty',function(){ equal(25,newValue,'zero numerical value decremented by specified increment'); }); -test('toggle function, should be boolean',function(){ +test('toggle function, should be boolean',function() { equal(object.toggleProperty('toggleVal',true,false),object.get('toggleVal')); equal(object.toggleProperty('toggleVal',true,false),object.get('toggleVal')); equal(object.toggleProperty('toggleVal',undefined,undefined),object.get('toggleVal')); }); -test('should notify array observer when array changes',function(){ +test('should notify array observer when array changes',function() { get(object, 'normalArray').replace(0,0,6); equal(object.abnormal, 'notifiedObserver', 'observer should be notified'); }); @@ -735,7 +735,7 @@ module("object.addObserver()", { this.incrementor= this.incrementor+1; }, - chainedObserver:function(){ + chainedObserver:function() { this.normal2 = 'chainedPropertyObserved' ; } @@ -777,7 +777,7 @@ module("object.removeObserver()", { removeAction: function() { this.normal2 = 'newDependentValue'; }, - removeChainedObserver:function(){ + removeChainedObserver:function() { this.normal2 = 'chainedPropertyObserved' ; }, @@ -867,12 +867,12 @@ module("Bind function ", { test("should bind property with method parameter as undefined", function() { // creating binding - Ember.run(function(){ + Ember.run(function() { objectA.bind("name", "Namespace.objectB.normal",undefined) ; }); // now make a change to see if the binding triggers. - Ember.run(function(){ + Ember.run(function() { objectB.set("normal", "changedValue") ; });
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-runtime/tests/legacy_1x/system/binding_test.js
@@ -129,7 +129,7 @@ module("one way binding", { binding = Ember.oneWay(root, 'toObject.value', 'fromObject.value'); }); }, - teardown: function(){ + teardown: function() { Ember.run.cancelTimers(); } }); @@ -178,7 +178,7 @@ module("chained binding", { binding2 = Ember.bind(root, 'second.output', 'third.input'); }); }, - teardown: function(){ + teardown: function() { Ember.run.cancelTimers(); } }); @@ -263,7 +263,7 @@ test("two bindings to the same value should sync in the order they are initializ // module("propertyNameBinding with longhand", { - setup: function(){ + setup: function() { TestNamespace = {}; Ember.run(function () { TestNamespace.fromObject = Ember.Object.create({ @@ -277,12 +277,12 @@ module("propertyNameBinding with longhand", { }); }); }, - teardown: function(){ + teardown: function() { TestNamespace = undefined; } }); -test("works with full path", function(){ +test("works with full path", function() { Ember.run(function () { set(TestNamespace.fromObject, 'value', "updatedValue"); }); @@ -296,7 +296,7 @@ test("works with full path", function(){ equal(get(TestNamespace.toObject, 'value'), "newerValue"); }); -test("works with local path", function(){ +test("works with local path", function() { Ember.run(function () { set(TestNamespace.toObject, 'localValue', "updatedValue"); });
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-runtime/tests/legacy_1x/system/object/base_test.js
@@ -76,7 +76,7 @@ module("Ember.Object observers", { prop1: null, // normal observer - observer: Ember.observer(function(){ + observer: Ember.observer(function() { this._normal = true; }, "prop1"), @@ -134,7 +134,7 @@ module("Ember.Object superclass and subclasses", { } }); -test("Checking the detect() function on an object and its subclass", function(){ +test("Checking the detect() function on an object and its subclass", function() { equal(obj.detect(obj1), true); equal(obj1.detect(obj), false); });
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-runtime/tests/legacy_1x/system/object/bindings_test.js
@@ -54,7 +54,7 @@ var bindModuleOpts = { module("bind() method", bindModuleOpts); test("bind(TestNamespace.fromObject.bar) should follow absolute path", function() { - Ember.run(function(){ + Ember.run(function() { // create binding testObject.bind("foo", "TestNamespace.fromObject.bar"); @@ -66,7 +66,7 @@ test("bind(TestNamespace.fromObject.bar) should follow absolute path", function( }); test("bind(.bar) should bind to relative path", function() { - Ember.run(function(){ + Ember.run(function() { // create binding testObject.bind("foo", "bar") ; @@ -113,7 +113,7 @@ module("fooBinding method", fooBindingModuleOpts); test("fooBinding: TestNamespace.fromObject.bar should follow absolute path", function() { // create binding - Ember.run(function(){ + Ember.run(function() { testObject = TestObject.createWithMixins({ fooBinding: "TestNamespace.fromObject.bar" }) ; @@ -127,7 +127,7 @@ test("fooBinding: TestNamespace.fromObject.bar should follow absolute path", fun }); test("fooBinding: .bar should bind to relative path", function() { - Ember.run(function(){ + Ember.run(function() { testObject = TestObject.createWithMixins({ fooBinding: "bar" }); @@ -139,7 +139,7 @@ test("fooBinding: .bar should bind to relative path", function() { }); test('fooBinding: should disconnect bindings when destroyed', function () { - Ember.run(function(){ + Ember.run(function() { testObject = TestObject.createWithMixins({ fooBinding: "TestNamespace.fromObject.bar" }); @@ -151,7 +151,7 @@ test('fooBinding: should disconnect bindings when destroyed', function () { Ember.destroy(testObject); - Ember.run(function(){ + Ember.run(function() { set(TestNamespace.fromObject, 'bar', 'BIFF'); });
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-runtime/tests/legacy_1x/system/object/concatenated_test.js
@@ -15,7 +15,7 @@ var klass, get = Ember.get, set = Ember.set; module("Ember.Object Concatenated Properties", { - setup: function(){ + setup: function() { klass = Ember.Object.extend({ concatenatedProperties: ['values'], values: ['a', 'b', 'c']
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-runtime/tests/legacy_1x/system/set_test.js
@@ -234,7 +234,7 @@ test("should remove a bools and reduce length", function() { equal(set.length, oldLength-2, "should be 2 shorter") ; }); -test("should remove 0 and reduce length", function(){ +test("should remove 0 and reduce length", function() { var oldLength = set.length; set.remove(0) ; equal(set.contains(0), false, "should be removed") ; @@ -294,7 +294,7 @@ test("the pop() should remove an arbitrary object from the set", function() { equal(set.length, oldLength-1, 'length shorter by 1'); }); -test("should pop false and 0", function(){ +test("should pop false and 0", function() { set = new Ember.Set(Ember.A([false])); ok(set.pop() === false, "should pop false");
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-runtime/tests/mixins/array_test.js
@@ -61,15 +61,15 @@ Ember.ArrayTests.extend({ }).run(); -test("the return value of slice has Ember.Array applied", function(){ +test("the return value of slice has Ember.Array applied", function() { var x = Ember.Object.createWithMixins(Ember.Array, { length: 0 }); var y = x.slice(1); equal(Ember.Array.detect(y), true, "mixin should be applied"); }); -test("slice supports negative index arguments", function(){ +test("slice supports negative index arguments", function() { var testArray = new TestArray([1,2,3,4]); deepEqual(testArray.slice(-2), [3, 4], 'slice(-2)');
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-runtime/tests/mixins/deferred_test.js
@@ -205,7 +205,7 @@ test("can self reject", function() { deferred = Ember.Object.createWithMixins(Ember.DeferredMixin); }); - deferred.then(function(){ + deferred.then(function() { ok(false, 'should not fulfill'); },function(value) { equal(value, deferred, "successfully rejected to itself"); @@ -274,7 +274,7 @@ test("can do multi level assimilation", function() { }); -test("can handle rejection without rejection handler", function(){ +test("can handle rejection without rejection handler", function() { expect(2); var reason = 'some reason'; @@ -283,17 +283,17 @@ test("can handle rejection without rejection handler", function(){ return Ember.Object.createWithMixins(Ember.DeferredMixin); }); - deferred.then().then(function(){ + deferred.then().then(function() { ok(false, 'expected rejection, got fulfillment'); - }, function(actualReason){ + }, function(actualReason) { ok(true, 'expected fulfillment'); equal(actualReason, reason); }); Ember.run(deferred, 'reject', reason); }); -test("can handle fulfillment without fulfillment handler", function(){ +test("can handle fulfillment without fulfillment handler", function() { expect(2); var fulfillment = 'some fulfillment';
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-runtime/tests/mixins/enumerable_test.js
@@ -55,41 +55,41 @@ Ember.EnumerableTests.extend({ }).run(); -test("should apply Ember.Array to return value of map", function(){ +test("should apply Ember.Array to return value of map", function() { var x = Ember.Object.createWithMixins(Ember.Enumerable); var y = x.map(Ember.K); equal(Ember.Array.detect(y), true, "should have mixin applied"); }); -test("should apply Ember.Array to return value of filter", function(){ +test("should apply Ember.Array to return value of filter", function() { var x = Ember.Object.createWithMixins(Ember.Enumerable); var y = x.filter(Ember.K); equal(Ember.Array.detect(y), true, "should have mixin applied"); }); -test("should apply Ember.Array to return value of invoke", function(){ +test("should apply Ember.Array to return value of invoke", function() { var x = Ember.Object.createWithMixins(Ember.Enumerable); var y = x.invoke(Ember.K); equal(Ember.Array.detect(y), true, "should have mixin applied"); }); -test("should apply Ember.Array to return value of toArray", function(){ +test("should apply Ember.Array to return value of toArray", function() { var x = Ember.Object.createWithMixins(Ember.Enumerable); var y = x.toArray(Ember.K); equal(Ember.Array.detect(y), true, "should have mixin applied"); }); -test("should apply Ember.Array to return value of without", function(){ +test("should apply Ember.Array to return value of without", function() { var x = Ember.Object.createWithMixins(Ember.Enumerable, { - contains: function(){ + contains: function() { return true; } }); var y = x.without(Ember.K); equal(Ember.Array.detect(y), true, "should have mixin applied"); }); -test("should apply Ember.Array to return value of uniq", function(){ +test("should apply Ember.Array to return value of uniq", function() { var x = Ember.Object.createWithMixins(Ember.Enumerable); var y = x.uniq(Ember.K); equal(Ember.Array.detect(y), true, "should have mixin applied");
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-runtime/tests/mixins/sortable_test.js
@@ -238,14 +238,14 @@ module("Ember.Sortable with sortFunction and sortProperties", { Ember.run(function() { sortedArrayController = Ember.ArrayController.create({ sortProperties: ['name'], - sortFunction: function(v, w){ + sortFunction: function(v, w) { var lowerV = v.toLowerCase(), lowerW = w.toLowerCase(); - if(lowerV < lowerW){ + if (lowerV < lowerW) { return -1; } - if(lowerV > lowerW){ + if (lowerV > lowerW) { return 1; } return 0;
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-runtime/tests/mixins/target_action_support_test.js
@@ -72,7 +72,7 @@ test("it should find targets specified using a property path", function() { ok(true === myObj.triggerAction(), "a valid target and action were specified"); }); -test("it should use an actionContext object specified as a property on the object", function(){ +test("it should use an actionContext object specified as a property on the object", function() { expect(2); var obj = Ember.Object.createWithMixins(Ember.TargetActionSupport,{ action: 'anEvent', @@ -86,7 +86,7 @@ test("it should use an actionContext object specified as a property on the objec ok(true === obj.triggerAction(), "a valid target and action were specified"); }); -test("it should find an actionContext specified as a property path", function(){ +test("it should find an actionContext specified as a property path", function() { expect(2); var Test = {}; @@ -105,7 +105,7 @@ test("it should find an actionContext specified as a property path", function(){ ok(true === obj.triggerAction(), "a valid target and action were specified"); }); -test("it should use the target specified in the argument", function(){ +test("it should use the target specified in the argument", function() { expect(2); var targetObj = Ember.Object.create({ anEvent: function() { @@ -118,7 +118,7 @@ test("it should use the target specified in the argument", function(){ ok(true === obj.triggerAction({target: targetObj}), "a valid target and action were specified"); }); -test("it should use the action specified in the argument", function(){ +test("it should use the action specified in the argument", function() { expect(2); var obj = Ember.Object.createWithMixins(Ember.TargetActionSupport,{ @@ -131,7 +131,7 @@ test("it should use the action specified in the argument", function(){ ok(true === obj.triggerAction({action: 'anEvent'}), "a valid target and action were specified"); }); -test("it should use the actionContext specified in the argument", function(){ +test("it should use the actionContext specified in the argument", function() { expect(2); var context = {}, obj = Ember.Object.createWithMixins(Ember.TargetActionSupport,{
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-runtime/tests/suites/enumerable.js
@@ -209,7 +209,7 @@ var EnumerableTests = Ember.Object.extend({ @returns {void} */ - mutate: function(){}, + mutate: function() {}, /** Becomes true when you define a new mutate() method, indicating that
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-runtime/tests/system/array_proxy/arranged_content_test.js
@@ -145,12 +145,12 @@ test("toArray - returns copy of arrangedContent", function() { }); test("unshiftObject - adds to start of content", function() { - Ember.run(function(){ array.unshiftObject(6); }); + Ember.run(function() { array.unshiftObject(6); }); deepEqual(array.get('content'), [6,1,2,4,5], 'adds to start of content'); }); test("unshiftObjects - adds to start of content", function() { - Ember.run(function(){ array.unshiftObjects([6,7]); }); + Ember.run(function() { array.unshiftObjects([6,7]); }); deepEqual(array.get('content'), [6,7,1,2,4,5], 'adds to start of content'); });
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-runtime/tests/system/namespace/base_test.js
@@ -13,12 +13,12 @@ module('Ember.Namespace', { teardown: function() { Ember.BOOTED = false; - if (lookup.NamespaceA) { Ember.run(function(){ lookup.NamespaceA.destroy(); }); } - if (lookup.NamespaceB) { Ember.run(function(){ lookup.NamespaceB.destroy(); }); } + if (lookup.NamespaceA) { Ember.run(function() { lookup.NamespaceA.destroy(); }); } + if (lookup.NamespaceB) { Ember.run(function() { lookup.NamespaceB.destroy(); }); } if (lookup.namespaceC) { try { Ember.TESTING_DEPRECATION = true; - Ember.run(function(){ + Ember.run(function() { lookup.namespaceC.destroy(); }); } finally {
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-runtime/tests/system/object/create_test.js
@@ -68,13 +68,13 @@ test("calls setUnknownProperty if defined", function() { test("throws if you try to define a computed property", function() { expectAssertion(function() { Ember.Object.create({ - foo: Ember.computed(function(){}) + foo: Ember.computed(function() {}) }); }, 'Ember.Object.create no longer supports defining computed properties.'); }); test("throws if you try to call _super in a method", function() { - expectAssertion(function(){ + expectAssertion(function() { Ember.Object.create({ foo: function() { this._super(); @@ -83,14 +83,14 @@ test("throws if you try to call _super in a method", function() { }, 'Ember.Object.create no longer supports defining methods that call _super.'); }); -test("throws if you try to 'mixin' a definition", function(){ +test("throws if you try to 'mixin' a definition", function() { var myMixin = Ember.Mixin.create({ - adder: function(arg1, arg2){ + adder: function(arg1, arg2) { return arg1 + arg2; } }); - expectAssertion(function(){ + expectAssertion(function() { var o = Ember.Object.create(myMixin); }, "Ember.Object.create no longer supports mixing in other definitions, use createWithMixins instead."); });
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-runtime/tests/system/object/destroy_test.js
@@ -145,7 +145,7 @@ test("bindings should be synced when are updated in the willDestroy hook", funct bar: bar }); - Ember.run(function(){ + Ember.run(function() { Ember.bind(foo, 'value', 'bar.value'); });
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-runtime/tests/system/object/toString_test.js
@@ -67,7 +67,7 @@ test("toString on a namespace finds the namespace in Ember.lookup", function() { test('toString includes toStringExtension if defined', function() { var Foo = Ember.Object.extend({ - toStringExtension: function(){ + toStringExtension: function() { return "fooey"; } }),
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-states/lib/state.js
@@ -220,7 +220,7 @@ Ember.State.reopenClass({ bManager = Ember.StateManager.create({ stateOne: Ember.State.create({ - changeToStateTwo: function(manager, context){ + changeToStateTwo: function(manager, context) { manager.transitionTo('stateTwo', context) } }),
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-states/lib/state_manager.js
@@ -285,7 +285,7 @@ var sendEvent = function(eventName, sendRecursiveArguments, isUnhandledPass) { ```javascript managerC = Ember.StateManager.create({ - initialState: function(){ + initialState: function() { if (someLogic) { return 'active'; } else { @@ -328,12 +328,12 @@ var sendEvent = function(eventName, sendRecursiveArguments, isUnhandledPass) { robotManager = Ember.StateManager.create({ initialState: 'poweredDown', poweredDown: Ember.State.create({ - exit: function(stateManager){ + exit: function(stateManager) { console.log("exiting the poweredDown state") } }), poweredUp: Ember.State.create({ - enter: function(stateManager){ + enter: function(stateManager) { console.log("entering the poweredUp state. Destroy all humans.") } }) @@ -356,12 +356,12 @@ var sendEvent = function(eventName, sendRecursiveArguments, isUnhandledPass) { robotManager = Ember.StateManager.create({ initialState: 'poweredDown', poweredDown: Ember.State.create({ - exit: function(stateManager){ + exit: function(stateManager) { console.log("exiting the poweredDown state") } }), poweredUp: Ember.State.create({ - enter: function(stateManager){ + enter: function(stateManager) { console.log("entering the poweredUp state. Destroy all humans.") } }) @@ -424,37 +424,37 @@ var sendEvent = function(eventName, sendRecursiveArguments, isUnhandledPass) { robotManager = Ember.StateManager.create({ initialState: 'poweredDown', poweredDown: Ember.State.create({ - enter: function(){}, - exit: function(){ + enter: function() {}, + exit: function() { console.log("exited poweredDown state") }, charging: Ember.State.create({ - enter: function(){}, - exit: function(){} + enter: function() {}, + exit: function() {} }), charged: Ember.State.create({ - enter: function(){ + enter: function() { console.log("entered charged state") }, - exit: function(){ + exit: function() { console.log("exited charged state") } }) }), poweredUp: Ember.State.create({ - enter: function(){ + enter: function() { console.log("entered poweredUp state") }, - exit: function(){}, + exit: function() {}, mobile: Ember.State.create({ - enter: function(){ + enter: function() { console.log("entered mobile state") }, - exit: function(){} + exit: function() {} }), stationary: Ember.State.create({ - enter: function(){}, - exit: function(){} + enter: function() {}, + exit: function() {} }) }) }) @@ -502,7 +502,7 @@ var sendEvent = function(eventName, sendRecursiveArguments, isUnhandledPass) { initialState: 'stateOne.substateOne.subsubstateOne', stateOne: Ember.State.create({ substateOne: Ember.State.create({ - anAction: function(manager, context){ + anAction: function(manager, context) { console.log("an action was called") }, subsubstateOne: Ember.State.create({}) @@ -565,7 +565,7 @@ var sendEvent = function(eventName, sendRecursiveArguments, isUnhandledPass) { }) }), stateTwo: Ember.State.create({ - anAction: function(manager, context){ + anAction: function(manager, context) { // will not be called below because it is // not a parent of the current state } @@ -586,18 +586,18 @@ var sendEvent = function(eventName, sendRecursiveArguments, isUnhandledPass) { initialState: 'poweredDown.charging', poweredDown: Ember.State.create({ charging: Ember.State.create({ - chargeComplete: function(manager, context){ + chargeComplete: function(manager, context) { manager.transitionTo('charged') } }), charged: Ember.State.create({ - boot: function(manager, context){ + boot: function(manager, context) { manager.transitionTo('poweredUp') } }) }), poweredUp: Ember.State.create({ - beginExtermination: function(manager, context){ + beginExtermination: function(manager, context) { manager.transitionTo('rampaging') }, rampaging: Ember.State.create() @@ -636,7 +636,7 @@ var sendEvent = function(eventName, sendRecursiveArguments, isUnhandledPass) { bManager = Ember.StateManager.create({ stateOne: Ember.State.create({ - changeToStateTwo: function(manager, context){ + changeToStateTwo: function(manager, context) { manager.transitionTo('stateTwo', context) } }),
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-states/tests/state_test.js
@@ -181,7 +181,7 @@ test("the isLeaf property is false when a state has child states", function() { equal(definitelyInside.get('isLeaf'), true); }); -test("propagates its container to its child states", function(){ +test("propagates its container to its child states", function() { var container = { lookup: Ember.K }, manager = Ember.StateManager.create({ container: container, @@ -203,23 +203,23 @@ test("propagates its container to its child states", function(){ }); module("Ember.State.transitionTo", { - setup: function(){ + setup: function() { _$ = Ember.$; Ember.$ = {}; - Ember.$.Event = function(){}; + Ember.$.Event = function() {}; }, - teardown: function(){ + teardown: function() { Ember.$ = _$; } }); -test("sets the transition target", function(){ +test("sets the transition target", function() { var receivedTarget, receivedContext, stateManager, transitionFunction; stateManager = { - transitionTo: function(target, context){ + transitionTo: function(target, context) { receivedTarget = target; receivedContext = context; } @@ -233,7 +233,7 @@ test("sets the transition target", function(){ ok(!receivedContext, "does not pass a context when given an event without context"); }); -test("passes no context arguments when there are no contexts", function(){ +test("passes no context arguments when there are no contexts", function() { var contextArgsCount, stateManager, transitionFunction, @@ -243,7 +243,7 @@ test("passes no context arguments when there are no contexts", function(){ event.contexts = []; stateManager = { - transitionTo: function(){ + transitionTo: function() { contextArgsCount = [].slice.call(arguments, 1).length; } }; @@ -255,7 +255,7 @@ test("passes no context arguments when there are no contexts", function(){ equal( contextArgsCount, 0); }); -test("passes through a single context", function(){ +test("passes through a single context", function() { var receivedContext, stateManager, transitionFunction, @@ -265,7 +265,7 @@ test("passes through a single context", function(){ event.contexts = [{ value: 'context value' }]; stateManager = { - transitionTo: function(target, context){ + transitionTo: function(target, context) { receivedContext = context; } }; @@ -277,7 +277,7 @@ test("passes through a single context", function(){ equal( receivedContext, event.contexts[0]); }); -test("passes through multiple contexts as additional arguments", function(){ +test("passes through multiple contexts as additional arguments", function() { var receivedContexts, stateManager, transitionFunction, @@ -287,7 +287,7 @@ test("passes through multiple contexts as additional arguments", function(){ event.contexts = [ { value: 'context1' }, { value: 'context2' } ]; stateManager = { - transitionTo: function(target){ + transitionTo: function(target) { receivedContexts = [].slice.call(arguments, 1); } }; @@ -299,7 +299,7 @@ test("passes through multiple contexts as additional arguments", function(){ deepEqual( receivedContexts, event.contexts); }); -test("does not mutate the event contexts value", function(){ +test("does not mutate the event contexts value", function() { var receivedContexts, stateManager, transitionFunction, @@ -312,7 +312,7 @@ test("does not mutate the event contexts value", function(){ event.contexts = originalContext.slice(); stateManager = { - transitionTo: function(target){ + transitionTo: function(target) { receivedContexts = [].slice.call(arguments, 1); } }; @@ -324,13 +324,13 @@ test("does not mutate the event contexts value", function(){ deepEqual(event.contexts, originalContext); }); -test("passes no context arguments when called with no context or event", function(){ +test("passes no context arguments when called with no context or event", function() { var receivedContexts, stateManager, transitionFunction; stateManager = { - transitionTo: function(target){ + transitionTo: function(target) { receivedContexts = [].slice.call(arguments, 1); } }; @@ -342,7 +342,7 @@ test("passes no context arguments when called with no context or event", functio equal( receivedContexts.length, 0, "transitionTo receives no context"); }); -test("handles contexts without an event", function(){ +test("handles contexts without an event", function() { var receivedContexts, stateManager, transitionFunction, @@ -353,7 +353,7 @@ test("handles contexts without an event", function(){ context2 = { value: 'context2', contexts: ''}; stateManager = { - transitionTo: function(target){ + transitionTo: function(target) { receivedContexts = [].slice.call(arguments, 1); } };
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-testing/lib/helpers.js
@@ -48,7 +48,7 @@ function click(app, selector, context) { function keyEvent(app, selector, context, type, keyCode) { var $el; - if(typeof keyCode === 'undefined'){ + if (typeof keyCode === 'undefined') { keyCode = type; type = context; context = null; @@ -165,7 +165,7 @@ function chain(app, promise, fn) { * Example: * * ``` -* visit('posts/index').then(function(){ +* visit('posts/index').then(function() { * // assert something * }); * ``` @@ -183,7 +183,7 @@ helper('visit', visit); * Example: * * ``` -* click('.some-jQuery-selector').then(function(){ +* click('.some-jQuery-selector').then(function() { * // assert something * }); * ``` @@ -200,7 +200,7 @@ helper('click', click); * Example: * * ``` -* keyEvent('.some-jQuery-selector', 'keypress', 13).then(function(){ +* keyEvent('.some-jQuery-selector', 'keypress', 13).then(function() { * // assert something * }); * ``` @@ -219,7 +219,7 @@ helper('keyEvent', keyEvent); * Example: * * ``` -* fillIn('#email', 'you@example.com').then(function(){ +* fillIn('#email', 'you@example.com').then(function() { * // assert something * }); * ```
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-testing/lib/support.js
@@ -29,7 +29,7 @@ $(function() { $.event.special.click = { // For checkbox, fire native event so checked state will be right trigger: function() { - if ( $.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { + if ($.nodeName( this, "input" ) && this.type === "checkbox" && this.click) { this.click(); return false; }
true
Other
emberjs
ember.js
239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8.json
fix code styling for consistency
packages/ember-testing/tests/acceptance_test.js
@@ -1,7 +1,7 @@ var App, find, click, fillIn, currentRoute, visit, originalAdapter; module("ember-testing Acceptance", { - setup: function(){ + setup: function() { Ember.$('<style>#ember-testing-container { position: absolute; background: white; bottom: 0; right: 0; width: 640px; height: 384px; overflow: auto; z-index: 9999; border: 1px solid #ccc; } #ember-testing { zoom: 50%; }</style>').appendTo('head'); Ember.$('<div id="ember-testing-container"><div id="ember-testing"></div></div>').appendTo('body'); Ember.run(function() { @@ -40,7 +40,7 @@ module("ember-testing Acceptance", { App.setupForTesting(); }); - Ember.run(function(){ + Ember.run(function() { App.advanceReadiness(); }); @@ -54,7 +54,7 @@ module("ember-testing Acceptance", { originalAdapter = Ember.Test.adapter; }, - teardown: function(){ + teardown: function() { App.removeTestHelpers(); Ember.$('#ember-testing-container, #ember-testing').remove(); Ember.run(App, App.destroy); @@ -82,7 +82,7 @@ test("helpers can be chained with then", function() { }).then(function() { equal(Ember.$('.ember-text-field').val(), 'yeah', "chained with fillIn"); return fillIn('.ember-text-field', '#ember-testing-container', "context working"); - }).then(function(){ + }).then(function() { equal(Ember.$('.ember-text-field').val(), 'context working', "chained with fillIn"); click(".does-not-exist"); }).then(function() { @@ -105,7 +105,7 @@ test("helpers can be chained to each other", function() { .then(function() { equal(currentRoute, 'comments', "Successfully visited posts route"); equal(Ember.$('.ember-text-field').val(), 'hello', "Fillin successfully works"); - find('.ember-text-field').one('keypress', function(e){ + find('.ember-text-field').one('keypress', function(e) { equal(e.keyCode, 13, "keyevent chained with correct keyCode."); }); })
true