foo');
@@ -294,7 +294,7 @@ if ('namespaceURI' in document.createElement('div')) {
QUnit.module("RenderBuffer namespaces");
- test("properly makes a content string SVG namespace inside an SVG tag", function() {
+ QUnit.test("properly makes a content string SVG namespace inside an SVG tag", function() {
var buffer = createRenderBuffer('svg', document.body);
buffer.generateElement();
buffer.push('
foo');
@@ -307,7 +307,7 @@ if ('namespaceURI' in document.createElement('div')) {
equal(element.childNodes[0].namespaceURI, svgNamespace, 'element is svg namespace');
});
- test("properly makes a path element svg namespace inside SVG context", function() {
+ QUnit.test("properly makes a path element svg namespace inside SVG context", function() {
var buffer = createRenderBuffer('path', document.createElementNS(svgNamespace, 'svg'));
buffer.generateElement();
buffer.push('
');
@@ -320,7 +320,7 @@ if ('namespaceURI' in document.createElement('div')) {
equal(element.childNodes[0].namespaceURI, svgNamespace, 'element is svg namespace');
});
- test("properly makes a foreignObject svg namespace inside SVG context", function() {
+ QUnit.test("properly makes a foreignObject svg namespace inside SVG context", function() {
var buffer = createRenderBuffer('foreignObject', document.createElementNS(svgNamespace, 'svg'));
buffer.generateElement();
buffer.push('
');
@@ -333,7 +333,7 @@ if ('namespaceURI' in document.createElement('div')) {
equal(element.childNodes[0].namespaceURI, xhtmlNamespace, 'element is xhtml namespace');
});
- test("properly makes a div xhtml namespace inside foreignObject context", function() {
+ QUnit.test("properly makes a div xhtml namespace inside foreignObject context", function() {
var buffer = createRenderBuffer('div', document.createElementNS(svgNamespace, 'foreignObject'));
buffer.generateElement();
buffer.push('
');
diff --git a/packages/ember-views/tests/system/sanitize_attribute_value_test.js b/packages/ember-views/tests/system/sanitize_attribute_value_test.js
index 8e3318943a5..7bdba562bff 100644
--- a/packages/ember-views/tests/system/sanitize_attribute_value_test.js
+++ b/packages/ember-views/tests/system/sanitize_attribute_value_test.js
@@ -12,7 +12,7 @@ for (var i = 0, l = goodProtocols.length; i < l; i++) {
}
function buildProtocolTest(protocol) {
- test('allows ' + protocol + ' protocol when element is not provided', function() {
+ QUnit.test('allows ' + protocol + ' protocol when element is not provided', function() {
expect(1);
var expected = protocol + '://foo.com';
@@ -22,7 +22,7 @@ function buildProtocolTest(protocol) {
});
}
-test('blocks javascript: protocol', function() {
+QUnit.test('blocks javascript: protocol', function() {
/* jshint scripturl:true */
expect(1);
@@ -33,7 +33,7 @@ test('blocks javascript: protocol', function() {
equal(actual, 'unsafe:' + expected, 'protocol escaped');
});
-test('blocks blacklisted protocols', function() {
+QUnit.test('blocks blacklisted protocols', function() {
/* jshint scripturl:true */
expect(1);
@@ -44,7 +44,7 @@ test('blocks blacklisted protocols', function() {
equal(actual, 'unsafe:' + expected, 'protocol escaped');
});
-test('does not block SafeStrings', function() {
+QUnit.test('does not block SafeStrings', function() {
/* jshint scripturl:true */
expect(1);
diff --git a/packages/ember-views/tests/system/view_utils_test.js b/packages/ember-views/tests/system/view_utils_test.js
index 2a52a403570..9292eefc6f0 100644
--- a/packages/ember-views/tests/system/view_utils_test.js
+++ b/packages/ember-views/tests/system/view_utils_test.js
@@ -33,7 +33,7 @@ QUnit.module("ViewUtils", {
});
-test("getViewClientRects", function() {
+QUnit.test("getViewClientRects", function() {
if (!hasGetClientRects || !ClientRectListCtor) {
ok(true, "The test environment does not support the DOM API required to run this test.");
return;
@@ -50,7 +50,7 @@ test("getViewClientRects", function() {
ok(Ember.ViewUtils.getViewClientRects(view) instanceof ClientRectListCtor);
});
-test("getViewBoundingClientRect", function() {
+QUnit.test("getViewBoundingClientRect", function() {
if (!hasGetBoundingClientRect || !ClientRectCtor) {
ok(true, "The test environment does not support the DOM API required to run this test.");
return;
diff --git a/packages/ember-views/tests/views/checkbox_test.js b/packages/ember-views/tests/views/checkbox_test.js
index 1f516410d06..3b47fce3ff0 100644
--- a/packages/ember-views/tests/views/checkbox_test.js
+++ b/packages/ember-views/tests/views/checkbox_test.js
@@ -32,7 +32,7 @@ QUnit.module("Ember.Checkbox", {
}
});
-test("should begin disabled if the disabled attribute is true", function() {
+QUnit.test("should begin disabled if the disabled attribute is true", function() {
checkboxView = Checkbox.create({});
checkboxView.set('disabled', true);
@@ -41,7 +41,7 @@ test("should begin disabled if the disabled attribute is true", function() {
ok(checkboxView.$().is(":disabled"));
});
-test("should become disabled if the disabled attribute is changed", function() {
+QUnit.test("should become disabled if the disabled attribute is changed", function() {
checkboxView = Checkbox.create({});
append();
@@ -54,7 +54,7 @@ test("should become disabled if the disabled attribute is changed", function() {
ok(checkboxView.$().is(":not(:disabled)"));
});
-test("should begin indeterminate if the indeterminate attribute is true", function() {
+QUnit.test("should begin indeterminate if the indeterminate attribute is true", function() {
checkboxView = Checkbox.create({});
checkboxView.set('indeterminate', true);
@@ -63,7 +63,7 @@ test("should begin indeterminate if the indeterminate attribute is true", functi
equal(checkboxView.$().prop('indeterminate'), true, "Checkbox should be indeterminate");
});
-test("should become indeterminate if the indeterminate attribute is changed", function() {
+QUnit.test("should become indeterminate if the indeterminate attribute is changed", function() {
checkboxView = Checkbox.create({});
append();
@@ -77,7 +77,7 @@ test("should become indeterminate if the indeterminate attribute is changed", fu
equal(checkboxView.$().prop('indeterminate'), false, "Checkbox should not be indeterminate");
});
-test("should support the tabindex property", function() {
+QUnit.test("should support the tabindex property", function() {
checkboxView = Checkbox.create({});
run(function() { checkboxView.set('tabindex', 6); });
@@ -89,7 +89,7 @@ test("should support the tabindex property", function() {
equal(checkboxView.$().prop('tabindex'), '3', 'the checkbox tabindex changes when it is changed in the view');
});
-test("checkbox name is updated when setting name property of view", function() {
+QUnit.test("checkbox name is updated when setting name property of view", function() {
checkboxView = Checkbox.create({});
run(function() { checkboxView.set('name', 'foo'); });
@@ -102,7 +102,7 @@ test("checkbox name is updated when setting name property of view", function() {
equal(checkboxView.$().attr('name'), "bar", "updates checkbox after name changes");
});
-test("checked property mirrors input value", function() {
+QUnit.test("checked property mirrors input value", function() {
checkboxView = Checkbox.create({});
run(function() { checkboxView.append(); });
@@ -125,7 +125,7 @@ test("checked property mirrors input value", function() {
equal(checkboxView.$().prop('checked'), false, "changing the value property changes the DOM");
});
-test("checking the checkbox updates the value", function() {
+QUnit.test("checking the checkbox updates the value", function() {
checkboxView = Checkbox.create({ checked: true });
append();
diff --git a/packages/ember-views/tests/views/collection_test.js b/packages/ember-views/tests/views/collection_test.js
index 411d59858a9..4e75467c113 100644
--- a/packages/ember-views/tests/views/collection_test.js
+++ b/packages/ember-views/tests/views/collection_test.js
@@ -31,7 +31,7 @@ QUnit.module("CollectionView", {
}
});
-test("should render a view for each item in its content array", function() {
+QUnit.test("should render a view for each item in its content array", function() {
view = CollectionView.create({
content: Ember.A([1, 2, 3, 4])
});
@@ -42,7 +42,7 @@ test("should render a view for each item in its content array", function() {
equal(view.$('div').length, 4);
});
-test("should render the emptyView if content array is empty (view class)", function() {
+QUnit.test("should render the emptyView if content array is empty (view class)", function() {
view = CollectionView.create({
tagName: 'del',
content: Ember.A(),
@@ -62,7 +62,7 @@ test("should render the emptyView if content array is empty (view class)", funct
ok(view.$().find('kbd:contains("OY SORRY GUVNAH")').length, "displays empty view");
});
-test("should render the emptyView if content array is empty (view instance)", function() {
+QUnit.test("should render the emptyView if content array is empty (view instance)", function() {
view = CollectionView.create({
tagName: 'del',
content: Ember.A(),
@@ -82,7 +82,7 @@ test("should render the emptyView if content array is empty (view instance)", fu
ok(view.$().find('kbd:contains("OY SORRY GUVNAH")').length, "displays empty view");
});
-test("should be able to override the tag name of itemViewClass even if tag is in default mapping", function() {
+QUnit.test("should be able to override the tag name of itemViewClass even if tag is in default mapping", function() {
view = CollectionView.create({
tagName: 'del',
content: Ember.A(['NEWS GUVNAH']),
@@ -102,7 +102,7 @@ test("should be able to override the tag name of itemViewClass even if tag is in
ok(view.$().find('kbd:contains("NEWS GUVNAH")').length, "displays the item view with proper tag name");
});
-test("should allow custom item views by setting itemViewClass", function() {
+QUnit.test("should allow custom item views by setting itemViewClass", function() {
var passedContents = [];
view = CollectionView.create({
content: Ember.A(['foo', 'bar', 'baz']),
@@ -126,7 +126,7 @@ test("should allow custom item views by setting itemViewClass", function() {
});
});
-test("should insert a new item in DOM when an item is added to the content array", function() {
+QUnit.test("should insert a new item in DOM when an item is added to the content array", function() {
var content = Ember.A(['foo', 'bar', 'baz']);
view = CollectionView.create({
@@ -154,7 +154,7 @@ test("should insert a new item in DOM when an item is added to the content array
equal(trim(view.$(':nth-child(2)').text()), 'quux');
});
-test("should remove an item from DOM when an item is removed from the content array", function() {
+QUnit.test("should remove an item from DOM when an item is removed from the content array", function() {
var content = Ember.A(['foo', 'bar', 'baz']);
view = CollectionView.create({
@@ -184,7 +184,7 @@ test("should remove an item from DOM when an item is removed from the content ar
});
});
-test("it updates the view if an item is replaced", function() {
+QUnit.test("it updates the view if an item is replaced", function() {
var content = Ember.A(['foo', 'bar', 'baz']);
view = CollectionView.create({
content: content,
@@ -214,7 +214,7 @@ test("it updates the view if an item is replaced", function() {
});
});
-test("can add and replace in the same runloop", function() {
+QUnit.test("can add and replace in the same runloop", function() {
var content = Ember.A(['foo', 'bar', 'baz']);
view = CollectionView.create({
content: content,
@@ -246,7 +246,7 @@ test("can add and replace in the same runloop", function() {
});
-test("can add and replace the object before the add in the same runloop", function() {
+QUnit.test("can add and replace the object before the add in the same runloop", function() {
var content = Ember.A(['foo', 'bar', 'baz']);
view = CollectionView.create({
content: content,
@@ -277,7 +277,7 @@ test("can add and replace the object before the add in the same runloop", functi
});
});
-test("can add and replace complicatedly", function() {
+QUnit.test("can add and replace complicatedly", function() {
var content = Ember.A(['foo', 'bar', 'baz']);
view = CollectionView.create({
content: content,
@@ -310,7 +310,7 @@ test("can add and replace complicatedly", function() {
});
});
-test("can add and replace complicatedly harder", function() {
+QUnit.test("can add and replace complicatedly harder", function() {
var content = Ember.A(['foo', 'bar', 'baz']);
view = CollectionView.create({
content: content,
@@ -344,7 +344,7 @@ test("can add and replace complicatedly harder", function() {
});
});
-test("should allow changes to content object before layer is created", function() {
+QUnit.test("should allow changes to content object before layer is created", function() {
view = CollectionView.create({
content: null
});
@@ -360,7 +360,7 @@ test("should allow changes to content object before layer is created", function(
ok(view.$().children().length);
});
-test("should fire life cycle events when elements are added and removed", function() {
+QUnit.test("should fire life cycle events when elements are added and removed", function() {
var view;
var didInsertElement = 0;
var willDestroyElement = 0;
@@ -445,7 +445,7 @@ test("should fire life cycle events when elements are added and removed", functi
equal(destroy, 8);
});
-test("should allow changing content property to be null", function() {
+QUnit.test("should allow changing content property to be null", function() {
view = CollectionView.create({
content: Ember.A([1, 2, 3]),
@@ -467,7 +467,7 @@ test("should allow changing content property to be null", function() {
equal(trim(view.$().children().text()), "(empty)", "should display empty view");
});
-test("should allow items to access to the CollectionView's current index in the content array", function() {
+QUnit.test("should allow items to access to the CollectionView's current index in the content array", function() {
view = CollectionView.create({
content: Ember.A(['zero', 'one', 'two']),
itemViewClass: View.extend({
@@ -486,7 +486,7 @@ test("should allow items to access to the CollectionView's current index in the
deepEqual(view.$(':nth-child(3)').text(), "2");
});
-test("should allow declaration of itemViewClass as a string", function() {
+QUnit.test("should allow declaration of itemViewClass as a string", function() {
var container = {
lookupFactory: function() {
return Ember.View.extend();
@@ -506,7 +506,7 @@ test("should allow declaration of itemViewClass as a string", function() {
equal(view.$('.ember-view').length, 3);
});
-test("should not render the emptyView if content is emptied and refilled in the same run loop", function() {
+QUnit.test("should not render the emptyView if content is emptied and refilled in the same run loop", function() {
view = CollectionView.create({
tagName: 'div',
content: Ember.A(['NEWS GUVNAH']),
@@ -533,7 +533,7 @@ test("should not render the emptyView if content is emptied and refilled in the
equal(view.$().find('kbd:contains("OY SORRY GUVNAH")').length, 0);
});
-test("a array_proxy that backs an sorted array_controller that backs a collection view functions properly", function() {
+QUnit.test("a array_proxy that backs an sorted array_controller that backs a collection view functions properly", function() {
var array = Ember.A([{ name: "Other Katz" }]);
var arrayProxy = ArrayProxy.create({ content: array });
@@ -564,7 +564,7 @@ test("a array_proxy that backs an sorted array_controller that backs a collectio
});
});
-test("when a collection view is emptied, deeply nested views elements are not removed from the DOM and then destroyed again", function() {
+QUnit.test("when a collection view is emptied, deeply nested views elements are not removed from the DOM and then destroyed again", function() {
var assertProperDestruction = Mixin.create({
destroyElement: function() {
if (this._state === 'inDOM') {
@@ -604,7 +604,7 @@ test("when a collection view is emptied, deeply nested views elements are not re
});
});
-test("should render the emptyView if content array is empty and emptyView is given as string", function() {
+QUnit.test("should render the emptyView if content array is empty and emptyView is given as string", function() {
Ember.lookup = {
App: {
EmptyView: View.extend({
@@ -629,7 +629,7 @@ test("should render the emptyView if content array is empty and emptyView is giv
ok(view.$().find('kbd:contains("THIS IS AN EMPTY VIEW")').length, "displays empty view");
});
-test("should lookup against the container if itemViewClass is given as a string", function() {
+QUnit.test("should lookup against the container if itemViewClass is given as a string", function() {
var ItemView = View.extend({
render: function(buf) {
buf.push(get(this, 'content'));
@@ -659,7 +659,7 @@ test("should lookup against the container if itemViewClass is given as a string"
}
});
-test("should lookup only global path against the container if itemViewClass is given as a string", function() {
+QUnit.test("should lookup only global path against the container if itemViewClass is given as a string", function() {
var ItemView = View.extend({
render: function(buf) {
buf.push(get(this, 'content'));
@@ -689,7 +689,7 @@ test("should lookup only global path against the container if itemViewClass is g
}
});
-test("should lookup against the container and render the emptyView if emptyView is given as string and content array is empty ", function() {
+QUnit.test("should lookup against the container and render the emptyView if emptyView is given as string and content array is empty ", function() {
var EmptyView = View.extend({
tagName: 'kbd',
render: function(buf) {
@@ -721,7 +721,7 @@ test("should lookup against the container and render the emptyView if emptyView
}
});
-test("should lookup from only global path against the container if emptyView is given as string and content array is empty ", function() {
+QUnit.test("should lookup from only global path against the container if emptyView is given as string and content array is empty ", function() {
var EmptyView = View.extend({
render: function(buf) {
buf.push("EMPTY");
diff --git a/packages/ember-views/tests/views/component_test.js b/packages/ember-views/tests/views/component_test.js
index 979715ce1d8..ceba86c6010 100644
--- a/packages/ember-views/tests/views/component_test.js
+++ b/packages/ember-views/tests/views/component_test.js
@@ -25,15 +25,15 @@ QUnit.module("Ember.Component", {
}
});
-test("The context of an Ember.Component is itself", function() {
+QUnit.test("The context of an Ember.Component is itself", function() {
strictEqual(component, component.get('context'), "A component's context is itself");
});
-test("The controller (target of `action`) of an Ember.Component is itself", function() {
+QUnit.test("The controller (target of `action`) of an Ember.Component is itself", function() {
strictEqual(component, component.get('controller'), "A component's controller is itself");
});
-test("A templateName specified to a component is moved to the layoutName", function() {
+QUnit.test("A templateName specified to a component is moved to the layoutName", function() {
expectDeprecation(/Do not specify templateName on a Component, use layoutName instead/);
component = Component.extend({
templateName: 'blah-blah'
@@ -42,7 +42,7 @@ test("A templateName specified to a component is moved to the layoutName", funct
equal(component.get('layoutName'), 'blah-blah', "The layoutName now contains the templateName specified.");
});
-test("A template specified to a component is moved to the layout", function() {
+QUnit.test("A template specified to a component is moved to the layout", function() {
expectDeprecation(/Do not specify template on a Component, use layout instead/);
component = Component.extend({
template: 'blah-blah'
@@ -51,7 +51,7 @@ test("A template specified to a component is moved to the layout", function() {
equal(component.get('layout'), 'blah-blah', "The layoutName now contains the templateName specified.");
});
-test("A template specified to a component is deprecated", function() {
+QUnit.test("A template specified to a component is deprecated", function() {
expectDeprecation(function() {
component = Component.extend({
template: 'blah-blah'
@@ -59,7 +59,7 @@ test("A template specified to a component is deprecated", function() {
}, 'Do not specify template on a Component, use layout instead.');
});
-test("A templateName specified to a component is deprecated", function() {
+QUnit.test("A templateName specified to a component is deprecated", function() {
expectDeprecation(function() {
component = Component.extend({
templateName: 'blah-blah'
@@ -67,7 +67,7 @@ test("A templateName specified to a component is deprecated", function() {
}, 'Do not specify templateName on a Component, use layoutName instead.');
});
-test("Specifying both templateName and layoutName to a component is NOT deprecated", function() {
+QUnit.test("Specifying both templateName and layoutName to a component is NOT deprecated", function() {
expectNoDeprecation();
component = Component.extend({
templateName: 'blah-blah',
@@ -78,7 +78,7 @@ test("Specifying both templateName and layoutName to a component is NOT deprecat
equal(get(component, 'layoutName'), 'hum-drum');
});
-test("Specifying a templateName on a component with a layoutName specified in a superclass is NOT deprecated", function() {
+QUnit.test("Specifying a templateName on a component with a layoutName specified in a superclass is NOT deprecated", function() {
expectNoDeprecation();
var Parent = Component.extend({
layoutName: 'hum-drum'
@@ -122,12 +122,12 @@ QUnit.module("Ember.Component - Actions", {
}
});
-test("Calling sendAction on a component without an action defined does nothing", function() {
+QUnit.test("Calling sendAction on a component without an action defined does nothing", function() {
component.sendAction();
equal(sendCount, 0, "addItem action was not invoked");
});
-test("Calling sendAction on a component with an action defined calls send on the controller", function() {
+QUnit.test("Calling sendAction on a component with an action defined calls send on the controller", function() {
set(component, 'action', "addItem");
component.sendAction();
@@ -136,7 +136,7 @@ test("Calling sendAction on a component with an action defined calls send on the
equal(actionCounts['addItem'], 1, "addItem event was sent once");
});
-test("Calling sendAction with a named action uses the component's property as the action name", function() {
+QUnit.test("Calling sendAction with a named action uses the component's property as the action name", function() {
set(component, 'playing', "didStartPlaying");
set(component, 'action', "didDoSomeBusiness");
@@ -156,7 +156,7 @@ test("Calling sendAction with a named action uses the component's property as th
equal(actionCounts['didDoSomeBusiness'], 1, "default action was sent");
});
-test("Calling sendAction when the action name is not a string raises an exception", function() {
+QUnit.test("Calling sendAction when the action name is not a string raises an exception", function() {
set(component, 'action', {});
set(component, 'playing', {});
@@ -169,7 +169,7 @@ test("Calling sendAction when the action name is not a string raises an exceptio
});
});
-test("Calling sendAction on a component with a context", function() {
+QUnit.test("Calling sendAction on a component with a context", function() {
set(component, 'playing', "didStartPlaying");
var testContext = { song: 'She Broke My Ember' };
@@ -179,7 +179,7 @@ test("Calling sendAction on a component with a context", function() {
deepEqual(actionArguments, [testContext], "context was sent with the action");
});
-test("Calling sendAction on a component with multiple parameters", function() {
+QUnit.test("Calling sendAction on a component with multiple parameters", function() {
set(component, 'playing', "didStartPlaying");
var firstContext = { song: 'She Broke My Ember' };
@@ -193,7 +193,7 @@ test("Calling sendAction on a component with multiple parameters", function() {
if (Ember.FEATURES.isEnabled('ember-metal-injected-properties')) {
QUnit.module('Ember.Component - injected properties');
- test("services can be injected into components", function() {
+ QUnit.test("services can be injected into components", function() {
var registry = new Registry();
var container = registry.container();
@@ -213,7 +213,7 @@ if (Ember.FEATURES.isEnabled('ember-metal-injected-properties')) {
QUnit.module('Ember.Component - subscribed and sent actions trigger errors');
-test('something', function() {
+QUnit.test('something', function() {
expect(2);
var appComponent = Component.extend({
@@ -231,7 +231,7 @@ test('something', function() {
}, /had no action handler for: baz/, 'asdf');
});
-test('component with target', function() {
+QUnit.test('component with target', function() {
expect(2);
var target = {
diff --git a/packages/ember-views/tests/views/container_view_test.js b/packages/ember-views/tests/views/container_view_test.js
index 10a3ffeb4a5..ade0f160889 100644
--- a/packages/ember-views/tests/views/container_view_test.js
+++ b/packages/ember-views/tests/views/container_view_test.js
@@ -21,7 +21,7 @@ QUnit.module("ember-views/views/container_view_test", {
}
});
-test("should be able to insert views after the DOM representation is created", function() {
+QUnit.test("should be able to insert views after the DOM representation is created", function() {
container = ContainerView.create({
classNameBindings: ['name'],
name: 'foo',
@@ -52,7 +52,7 @@ test("should be able to insert views after the DOM representation is created", f
});
-test("should be able to observe properties that contain child views", function() {
+QUnit.test("should be able to observe properties that contain child views", function() {
expectDeprecation("Setting `childViews` on a Container is deprecated.");
run(function() {
@@ -77,7 +77,7 @@ test("should be able to observe properties that contain child views", function()
equal(container.get('displayIsDisplayed'), false, "can bind to child view");
});
-test("childViews inherit their parents iocContainer, and retain the original container even when moved", function() {
+QUnit.test("childViews inherit their parents iocContainer, and retain the original container even when moved", function() {
container = ContainerView.create({
container: {}
});
@@ -103,7 +103,7 @@ test("childViews inherit their parents iocContainer, and retain the original con
equal(get(view, 'container'), container.container, "still inherits its original parentViews iocContainer");
});
-test("should set the parentView property on views that are added to the child views array", function() {
+QUnit.test("should set the parentView property on views that are added to the child views array", function() {
container = ContainerView.create();
var ViewKlass = View.extend({
@@ -161,7 +161,7 @@ test("should set the parentView property on views that are added to the child vi
});
});
-test("should trigger parentViewDidChange when parentView is changed", function() {
+QUnit.test("should trigger parentViewDidChange when parentView is changed", function() {
container = ContainerView.create();
var secondContainer = ContainerView.create();
@@ -184,7 +184,7 @@ test("should trigger parentViewDidChange when parentView is changed", function()
});
});
-test("should be able to push initial views onto the ContainerView and have it behave", function() {
+QUnit.test("should be able to push initial views onto the ContainerView and have it behave", function() {
var Container = ContainerView.extend({
init: function () {
this._super.apply(this, arguments);
@@ -241,7 +241,7 @@ test("should be able to push initial views onto the ContainerView and have it be
run(container, 'destroy');
});
-test("views that are removed from a ContainerView should have their child views cleared", function() {
+QUnit.test("views that are removed from a ContainerView should have their child views cleared", function() {
container = ContainerView.create();
view = View.createWithMixins({
remove: function() {
@@ -266,7 +266,7 @@ test("views that are removed from a ContainerView should have their child views
equal(container.$().html(),'', "the child view is removed from the DOM");
});
-test("if a ContainerView starts with an empty currentView, nothing is displayed", function() {
+QUnit.test("if a ContainerView starts with an empty currentView, nothing is displayed", function() {
container = ContainerView.create();
run(function() {
@@ -277,7 +277,7 @@ test("if a ContainerView starts with an empty currentView, nothing is displayed"
equal(get(container, 'childViews.length'), 0, "should not have any child views");
});
-test("if a ContainerView starts with a currentView, it is rendered as a child view", function() {
+QUnit.test("if a ContainerView starts with a currentView, it is rendered as a child view", function() {
var controller = Controller.create();
container = ContainerView.create({
controller: controller
@@ -305,7 +305,7 @@ test("if a ContainerView starts with a currentView, it is rendered as a child vi
equal(read(mainView._keywords.view), mainView, 'view keyword is setup');
});
-test("if a ContainerView is created with a currentView, it is rendered as a child view", function() {
+QUnit.test("if a ContainerView is created with a currentView, it is rendered as a child view", function() {
var context = null;
var mainView = View.create({
template: function(ctx, opts) {
@@ -334,7 +334,7 @@ test("if a ContainerView is created with a currentView, it is rendered as a chil
equal(read(mainView._keywords.view), mainView, 'view keyword is setup');
});
-test("if a ContainerView starts with no currentView and then one is set, the ContainerView is updated", function() {
+QUnit.test("if a ContainerView starts with no currentView and then one is set, the ContainerView is updated", function() {
var context = null;
var mainView = View.create({
template: function(ctx, opts) {
@@ -369,7 +369,7 @@ test("if a ContainerView starts with no currentView and then one is set, the Con
equal(read(mainView._keywords.view), mainView, 'view keyword is setup');
});
-test("if a ContainerView starts with a currentView and then is set to null, the ContainerView is updated", function() {
+QUnit.test("if a ContainerView starts with a currentView and then is set to null, the ContainerView is updated", function() {
var context = null;
var mainView = View.create({
template: function(ctx, opts) {
@@ -406,7 +406,7 @@ test("if a ContainerView starts with a currentView and then is set to null, the
equal(get(container, 'childViews.length'), 0, "should not have any child views");
});
-test("if a ContainerView starts with a currentView and then is set to null, the ContainerView is updated and the previous currentView is destroyed", function() {
+QUnit.test("if a ContainerView starts with a currentView and then is set to null, the ContainerView is updated and the previous currentView is destroyed", function() {
var context = null;
var mainView = View.create({
template: function(ctx, opts) {
@@ -445,7 +445,7 @@ test("if a ContainerView starts with a currentView and then is set to null, the
equal(get(container, 'childViews.length'), 0, "should not have any child views");
});
-test("if a ContainerView starts with a currentView and then a different currentView is set, the old view is destroyed and the new one is added", function() {
+QUnit.test("if a ContainerView starts with a currentView and then a different currentView is set, the old view is destroyed and the new one is added", function() {
container = ContainerView.create();
var mainView = View.create({
template: function() {
@@ -497,7 +497,7 @@ test("if a ContainerView starts with a currentView and then a different currentV
equal(trim(container.$().text()), "This is the tertiary view.", "should render its child");
});
-test("should be able to modify childViews many times during an run loop", function () {
+QUnit.test("should be able to modify childViews many times during an run loop", function () {
container = ContainerView.create();
@@ -535,7 +535,7 @@ test("should be able to modify childViews many times during an run loop", functi
equal(trim(container.$().text()), 'onetwothree');
});
-test("should be able to modify childViews then remove the ContainerView in same run loop", function () {
+QUnit.test("should be able to modify childViews then remove the ContainerView in same run loop", function () {
container = ContainerView.create();
run(function() {
@@ -558,7 +558,7 @@ test("should be able to modify childViews then remove the ContainerView in same
equal(count, 0, 'did not render child');
});
-test("should be able to modify childViews then destroy the ContainerView in same run loop", function () {
+QUnit.test("should be able to modify childViews then destroy the ContainerView in same run loop", function () {
container = ContainerView.create();
run(function() {
@@ -582,7 +582,7 @@ test("should be able to modify childViews then destroy the ContainerView in same
});
-test("should be able to modify childViews then rerender the ContainerView in same run loop", function () {
+QUnit.test("should be able to modify childViews then rerender the ContainerView in same run loop", function () {
container = ContainerView.create();
run(function() {
@@ -608,7 +608,7 @@ test("should be able to modify childViews then rerender the ContainerView in sam
equal(trim(container.$().text()), 'child');
});
-test("should be able to modify childViews then rerender then modify again the ContainerView in same run loop", function () {
+QUnit.test("should be able to modify childViews then rerender then modify again the ContainerView in same run loop", function () {
container = ContainerView.create();
run(function() {
@@ -636,7 +636,7 @@ test("should be able to modify childViews then rerender then modify again the Co
equal(trim(container.$().text()), 'onetwo');
});
-test("should be able to modify childViews then rerender again the ContainerView in same run loop and then modify again", function () {
+QUnit.test("should be able to modify childViews then rerender again the ContainerView in same run loop and then modify again", function () {
container = ContainerView.create();
run(function() {
@@ -674,7 +674,7 @@ test("should be able to modify childViews then rerender again the ContainerView
equal(trim(container.$().text()), 'onetwo');
});
-test("should invalidate `element` on itself and childViews when being rendered by ensureChildrenAreInDOM", function () {
+QUnit.test("should invalidate `element` on itself and childViews when being rendered by ensureChildrenAreInDOM", function () {
expectDeprecation("Setting `childViews` on a Container is deprecated.");
var root = ContainerView.create();
@@ -702,7 +702,7 @@ test("should invalidate `element` on itself and childViews when being rendered b
});
});
-test("Child view can only be added to one container at a time", function () {
+QUnit.test("Child view can only be added to one container at a time", function () {
expect(2);
container = ContainerView.create();
@@ -735,7 +735,7 @@ test("Child view can only be added to one container at a time", function () {
});
});
-test("if a containerView appends a child in its didInsertElement event, the didInsertElement event of the child view should be fired once", function () {
+QUnit.test("if a containerView appends a child in its didInsertElement event, the didInsertElement event of the child view should be fired once", function () {
var counter = 0;
var root = ContainerView.create({});
@@ -775,7 +775,7 @@ test("if a containerView appends a child in its didInsertElement event, the didI
});
-test("ContainerView is observable [DEPRECATED]", function() {
+QUnit.test("ContainerView is observable [DEPRECATED]", function() {
container = ContainerView.create();
var observerFired = false;
expectDeprecation(function() {
diff --git a/packages/ember-views/tests/views/instrumentation_test.js b/packages/ember-views/tests/views/instrumentation_test.js
index a58aff58acf..3d2048dfaa0 100644
--- a/packages/ember-views/tests/views/instrumentation_test.js
+++ b/packages/ember-views/tests/views/instrumentation_test.js
@@ -43,7 +43,7 @@ QUnit.module("EmberView#instrumentation", {
}
});
-test("generates the proper instrumentation details when called directly", function() {
+QUnit.test("generates the proper instrumentation details when called directly", function() {
var payload = {};
view.instrumentDetails(payload);
@@ -51,7 +51,7 @@ test("generates the proper instrumentation details when called directly", functi
confirmPayload(payload, view);
});
-test("should add ember-view to views", function() {
+QUnit.test("should add ember-view to views", function() {
run(view, 'createElement');
confirmPayload(beforeCalls[0], view);
diff --git a/packages/ember-views/tests/views/metamorph_view_test.js b/packages/ember-views/tests/views/metamorph_view_test.js
index 3279e879e49..8f0fccec0ce 100644
--- a/packages/ember-views/tests/views/metamorph_view_test.js
+++ b/packages/ember-views/tests/views/metamorph_view_test.js
@@ -32,7 +32,7 @@ QUnit.module("Metamorph views", {
}
});
-test("a Metamorph view is not a view's parentView", function() {
+QUnit.test("a Metamorph view is not a view's parentView", function() {
childView = EmberView.create({
render: function(buffer) {
buffer.push("
Bye bros
");
@@ -90,13 +90,13 @@ QUnit.module("Metamorph views correctly handle DOM", {
}
});
-test("a metamorph view generates without a DOM node", function() {
+QUnit.test("a metamorph view generates without a DOM node", function() {
var meta = jQuery("> h2", "#" + get(view, 'elementId'));
equal(meta.length, 1, "The metamorph element should be directly inside its parent");
});
-test("a metamorph view can be removed from the DOM", function() {
+QUnit.test("a metamorph view can be removed from the DOM", function() {
run(function() {
metamorphView.destroy();
});
@@ -105,7 +105,7 @@ test("a metamorph view can be removed from the DOM", function() {
equal(meta.length, 0, "the associated DOM was removed");
});
-test("a metamorph view can be rerendered", function() {
+QUnit.test("a metamorph view can be rerendered", function() {
equal(jQuery('#from-meta').text(), "Jason", "precond - renders to the DOM");
set(metamorphView, 'powerRanger', 'Trini');
@@ -120,7 +120,7 @@ test("a metamorph view can be rerendered", function() {
// Redefining without setup/teardown
QUnit.module("Metamorph views correctly handle DOM");
-test("a metamorph view calls its children's willInsertElement and didInsertElement", function() {
+QUnit.test("a metamorph view calls its children's willInsertElement and didInsertElement", function() {
var parentView;
var willInsertElementCalled = false;
var didInsertElementCalled = false;
@@ -160,7 +160,7 @@ test("a metamorph view calls its children's willInsertElement and didInsertEleme
});
-test("replacing a Metamorph should invalidate childView elements", function() {
+QUnit.test("replacing a Metamorph should invalidate childView elements", function() {
var elementOnDidInsert;
view = EmberView.create({
@@ -192,7 +192,7 @@ test("replacing a Metamorph should invalidate childView elements", function() {
run(function() { view.destroy(); });
});
-test("trigger rerender of parent and SimpleBoundView", function () {
+QUnit.test("trigger rerender of parent and SimpleBoundView", function () {
var view = EmberView.create({
show: true,
foo: 'bar',
@@ -215,7 +215,7 @@ test("trigger rerender of parent and SimpleBoundView", function () {
});
});
-test("re-rendering and then changing the property does not raise an exception", function() {
+QUnit.test("re-rendering and then changing the property does not raise an exception", function() {
view = EmberView.create({
show: true,
foo: 'bar',
diff --git a/packages/ember-views/tests/views/select_test.js b/packages/ember-views/tests/views/select_test.js
index 7126260bfa4..eda11bde906 100644
--- a/packages/ember-views/tests/views/select_test.js
+++ b/packages/ember-views/tests/views/select_test.js
@@ -34,17 +34,17 @@ function selectedOptions() {
return select.get('childViews').mapBy('selected');
}
-test("has 'ember-view' and 'ember-select' CSS classes", function() {
+QUnit.test("has 'ember-view' and 'ember-select' CSS classes", function() {
deepEqual(select.get('classNames'), ['ember-view', 'ember-select']);
});
-test("should render", function() {
+QUnit.test("should render", function() {
append();
ok(select.$().length, "Select renders");
});
-test("should begin disabled if the disabled attribute is true", function() {
+QUnit.test("should begin disabled if the disabled attribute is true", function() {
select.set('disabled', true);
append();
@@ -53,14 +53,14 @@ test("should begin disabled if the disabled attribute is true", function() {
// Browsers before IE10 do not support the required property.
if (document && ('required' in document.createElement('input'))) {
- test("should begin required if the required attribute is true", function() {
+ QUnit.test("should begin required if the required attribute is true", function() {
select.set('required', true);
append();
ok(select.element.required, 'required property is truthy');
});
- test("should become required if the required attribute is changed", function() {
+ QUnit.test("should become required if the required attribute is changed", function() {
append();
ok(!select.element.required, 'required property is falsy');
@@ -72,7 +72,7 @@ if (document && ('required' in document.createElement('input'))) {
});
}
-test("should become disabled if the disabled attribute is changed", function() {
+QUnit.test("should become disabled if the disabled attribute is changed", function() {
append();
ok(!select.element.disabled, 'disabled property is falsy');
@@ -83,7 +83,7 @@ test("should become disabled if the disabled attribute is changed", function() {
ok(!select.element.disabled, 'disabled property is falsy');
});
-test("can have options", function() {
+QUnit.test("can have options", function() {
select.set('content', Ember.A([1, 2, 3]));
append();
@@ -94,7 +94,7 @@ test("can have options", function() {
});
-test("select tabindex is updated when setting tabindex property of view", function() {
+QUnit.test("select tabindex is updated when setting tabindex property of view", function() {
run(function() { select.set('tabindex', '4'); });
append();
@@ -105,7 +105,7 @@ test("select tabindex is updated when setting tabindex property of view", functi
equal(select.$().attr('tabindex'), "1", "updates select after tabindex changes");
});
-test("select name is updated when setting name property of view", function() {
+QUnit.test("select name is updated when setting name property of view", function() {
run(function() { select.set('name', 'foo'); });
append();
@@ -116,7 +116,7 @@ test("select name is updated when setting name property of view", function() {
equal(select.$().attr('name'), "bar", "updates select after name changes");
});
-test("can specify the property path for an option's label and value", function() {
+QUnit.test("can specify the property path for an option's label and value", function() {
select.set('content', Ember.A([
{ id: 1, firstName: 'Yehuda' },
{ id: 2, firstName: 'Tom' }
@@ -133,7 +133,7 @@ test("can specify the property path for an option's label and value", function()
deepEqual(map(select.$('option').toArray(), function(el) { return jQuery(el).attr('value'); }), ["1", "2"], "Options should have values");
});
-test("can retrieve the current selected option when multiple=false", function() {
+QUnit.test("can retrieve the current selected option when multiple=false", function() {
var yehuda = { id: 1, firstName: 'Yehuda' };
var tom = { id: 2, firstName: 'Tom' };
@@ -149,7 +149,7 @@ test("can retrieve the current selected option when multiple=false", function()
equal(select.get('selection'), tom, "On change, the new option should be selected");
});
-test("can retrieve the current selected options when multiple=true", function() {
+QUnit.test("can retrieve the current selected options when multiple=true", function() {
var yehuda = { id: 1, firstName: 'Yehuda' };
var tom = { id: 2, firstName: 'Tom' };
var david = { id: 3, firstName: 'David' };
@@ -175,7 +175,7 @@ test("can retrieve the current selected options when multiple=true", function()
deepEqual(select.get('selection'), [tom, david], "On change, the new options should be selected");
});
-test("selection can be set when multiple=false", function() {
+QUnit.test("selection can be set when multiple=false", function() {
var yehuda = { id: 1, firstName: 'Yehuda' };
var tom = { id: 2, firstName: 'Tom' };
@@ -194,7 +194,7 @@ test("selection can be set when multiple=false", function() {
equal(select.$()[0].selectedIndex, 0, "After changing it, selection should be correct");
});
-test("selection can be set from a Promise when multiple=false", function() {
+QUnit.test("selection can be set from a Promise when multiple=false", function() {
expect(1);
var yehuda = { id: 1, firstName: 'Yehuda' };
@@ -211,7 +211,7 @@ test("selection can be set from a Promise when multiple=false", function() {
equal(select.$()[0].selectedIndex, 1, "Should select from Promise content");
});
-test("selection from a Promise don't overwrite newer selection once resolved, when multiple=false", function() {
+QUnit.test("selection from a Promise don't overwrite newer selection once resolved, when multiple=false", function() {
expect(1);
var yehuda = { id: 1, firstName: 'Yehuda' };
@@ -244,7 +244,7 @@ test("selection from a Promise don't overwrite newer selection once resolved, wh
append();
});
-test("selection from a Promise resolving to null should not select when multiple=false", function() {
+QUnit.test("selection from a Promise resolving to null should not select when multiple=false", function() {
expect(1);
var yehuda = { id: 1, firstName: 'Yehuda' };
@@ -261,7 +261,7 @@ test("selection from a Promise resolving to null should not select when multiple
equal(select.$()[0].selectedIndex, -1, "Should not select any object when the Promise resolve to null");
});
-test("selection can be set when multiple=true", function() {
+QUnit.test("selection can be set when multiple=true", function() {
var yehuda = { id: 1, firstName: 'Yehuda' };
var tom = { id: 2, firstName: 'Tom' };
var david = { id: 3, firstName: 'David' };
@@ -282,7 +282,7 @@ test("selection can be set when multiple=true", function() {
deepEqual(select.get('selection'), [yehuda], "After changing it, selection should be correct");
});
-test("selection can be set when multiple=true and prompt", function() {
+QUnit.test("selection can be set when multiple=true and prompt", function() {
var yehuda = { id: 1, firstName: 'Yehuda' };
var tom = { id: 2, firstName: 'Tom' };
var david = { id: 3, firstName: 'David' };
@@ -306,7 +306,7 @@ test("selection can be set when multiple=true and prompt", function() {
deepEqual(select.get('selection'), [yehuda], "After changing it, selection should be correct");
});
-test("multiple selections can be set when multiple=true", function() {
+QUnit.test("multiple selections can be set when multiple=true", function() {
var yehuda = { id: 1, firstName: 'Yehuda' };
var tom = { id: 2, firstName: 'Tom' };
var david = { id: 3, firstName: 'David' };
@@ -332,7 +332,7 @@ test("multiple selections can be set when multiple=true", function() {
"After changing it, selection should be correct");
});
-test("multiple selections can be set by changing in place the selection array when multiple=true", function() {
+QUnit.test("multiple selections can be set by changing in place the selection array when multiple=true", function() {
var yehuda = { id: 1, firstName: 'Yehuda' };
var tom = { id: 2, firstName: 'Tom' };
var david = { id: 3, firstName: 'David' };
@@ -361,7 +361,7 @@ test("multiple selections can be set by changing in place the selection array wh
});
-test("multiple selections can be set indirectly via bindings and in-place when multiple=true (issue #1058)", function() {
+QUnit.test("multiple selections can be set indirectly via bindings and in-place when multiple=true (issue #1058)", function() {
var indirectContent = EmberObject.create();
var tom = { id: 2, firstName: 'Tom' };
@@ -402,7 +402,7 @@ test("multiple selections can be set indirectly via bindings and in-place when m
deepEqual(select.get('selection'), [cyril], "After updating bound selection, selection should be correct");
});
-test("select with group can group options", function() {
+QUnit.test("select with group can group options", function() {
var content = Ember.A([
{ firstName: 'Yehuda', organization: 'Tilde' },
{ firstName: 'Tom', organization: 'Tilde' },
@@ -429,7 +429,7 @@ test("select with group can group options", function() {
equal(trim(select.$('optgroup').last().text()), 'Keith');
});
-test("select with group doesn't break options", function() {
+QUnit.test("select with group doesn't break options", function() {
var content = Ember.A([
{ id: 1, firstName: 'Yehuda', organization: 'Tilde' },
{ id: 2, firstName: 'Tom', organization: 'Tilde' },
@@ -458,7 +458,7 @@ test("select with group doesn't break options", function() {
deepEqual(select.get('selection'), content.get('firstObject'));
});
-test("select with group observes its content", function() {
+QUnit.test("select with group observes its content", function() {
var wycats = { firstName: 'Yehuda', organization: 'Tilde' };
var content = Ember.A([
wycats
@@ -489,7 +489,7 @@ test("select with group observes its content", function() {
equal(labels.join(''), 'YehudaKeith');
});
-test("select with group whose content is undefined doesn't breaks", function() {
+QUnit.test("select with group whose content is undefined doesn't breaks", function() {
var content;
run(function() {
@@ -503,7 +503,7 @@ test("select with group whose content is undefined doesn't breaks", function() {
equal(select.$('optgroup').length, 0);
});
-test("selection uses the same array when multiple=true", function() {
+QUnit.test("selection uses the same array when multiple=true", function() {
var yehuda = { id: 1, firstName: 'Yehuda' };
var tom = { id: 2, firstName: 'Tom' };
var david = { id: 3, firstName: 'David' };
@@ -530,7 +530,7 @@ test("selection uses the same array when multiple=true", function() {
deepEqual(selection, [tom,david], "On change the original selection array is updated");
});
-test("Ember.SelectedOption knows when it is selected when multiple=false", function() {
+QUnit.test("Ember.SelectedOption knows when it is selected when multiple=false", function() {
var yehuda = { id: 1, firstName: 'Yehuda' };
var tom = { id: 2, firstName: 'Tom' };
var david = { id: 3, firstName: 'David' };
@@ -552,7 +552,7 @@ test("Ember.SelectedOption knows when it is selected when multiple=false", funct
deepEqual(selectedOptions(), [false, false, false, true], "After changing it, selection should be correct");
});
-test("Ember.SelectedOption knows when it is selected when multiple=true", function() {
+QUnit.test("Ember.SelectedOption knows when it is selected when multiple=true", function() {
var yehuda = { id: 1, firstName: 'Yehuda' };
var tom = { id: 2, firstName: 'Tom' };
var david = { id: 3, firstName: 'David' };
@@ -576,7 +576,7 @@ test("Ember.SelectedOption knows when it is selected when multiple=true", functi
deepEqual(selectedOptions(), [false, true, true, false], "After changing it, selection should be correct");
});
-test("Ember.SelectedOption knows when it is selected when multiple=true and options are primitives", function() {
+QUnit.test("Ember.SelectedOption knows when it is selected when multiple=true and options are primitives", function() {
run(function() {
select.set('content', Ember.A([1, 2, 3, 4]));
select.set('multiple', true);
@@ -592,7 +592,7 @@ test("Ember.SelectedOption knows when it is selected when multiple=true and opti
deepEqual(selectedOptions(), [false, true, true, false], "After changing it, selection should be correct");
});
-test("a prompt can be specified", function() {
+QUnit.test("a prompt can be specified", function() {
var yehuda = { id: 1, firstName: 'Yehuda' };
var tom = { id: 2, firstName: 'Tom' };
@@ -626,7 +626,7 @@ test("a prompt can be specified", function() {
equal(select.get('selection'), tom, "Properly accounts for the prompt when DOM change occurs");
});
-test("handles null content", function() {
+QUnit.test("handles null content", function() {
append();
run(function() {
@@ -645,7 +645,7 @@ test("handles null content", function() {
equal(select.get('element').selectedIndex, -1, "should have no selection");
});
-test("valueBinding handles 0 as initiated value (issue #2763)", function() {
+QUnit.test("valueBinding handles 0 as initiated value (issue #2763)", function() {
var indirectData = EmberObject.create({
value: 0
});
@@ -668,7 +668,7 @@ test("valueBinding handles 0 as initiated value (issue #2763)", function() {
equal(select.get('value'), 0, "Value property should equal 0");
});
-test("should be able to select an option and then reselect the prompt", function() {
+QUnit.test("should be able to select an option and then reselect the prompt", function() {
run(function() {
select.set('content', Ember.A(['one', 'two', 'three']));
select.set('prompt', 'Select something');
@@ -686,7 +686,7 @@ test("should be able to select an option and then reselect the prompt", function
equal(select.$()[0].selectedIndex, 0);
});
-test("should be able to get the current selection's value", function() {
+QUnit.test("should be able to get the current selection's value", function() {
run(function() {
select.set('content', Ember.A([
{ label: 'Yehuda Katz', value: 'wycats' },
@@ -703,7 +703,7 @@ test("should be able to get the current selection's value", function() {
equal(select.get('value'), 'wycats');
});
-test("should be able to set the current selection by value", function() {
+QUnit.test("should be able to set the current selection by value", function() {
var ebryn = { label: 'Erik Bryn', value: 'ebryn' };
run(function() {
diff --git a/packages/ember-views/tests/views/simple_bound_view_test.js b/packages/ember-views/tests/views/simple_bound_view_test.js
index 021ed5343b5..bb396f5991d 100644
--- a/packages/ember-views/tests/views/simple_bound_view_test.js
+++ b/packages/ember-views/tests/views/simple_bound_view_test.js
@@ -3,7 +3,7 @@ import SimpleBoundView from "ember-views/views/simple_bound_view";
QUnit.module('SimpleBoundView');
-test('does not render if update is triggered by normalizedValue is the same as the previous normalizedValue', function() {
+QUnit.test('does not render if update is triggered by normalizedValue is the same as the previous normalizedValue', function() {
var value = null;
var obj = { 'foo': 'bar' };
var lazyValue = new Stream(function() {
diff --git a/packages/ember-views/tests/views/text_area_test.js b/packages/ember-views/tests/views/text_area_test.js
index 3bb0785314c..9b4066d3f1e 100644
--- a/packages/ember-views/tests/views/text_area_test.js
+++ b/packages/ember-views/tests/views/text_area_test.js
@@ -35,14 +35,14 @@ QUnit.module("TextArea", {
}
});
-test("should become disabled if the disabled attribute is true", function() {
+QUnit.test("should become disabled if the disabled attribute is true", function() {
textArea.set('disabled', true);
append();
ok(textArea.$().is(":disabled"));
});
-test("should become disabled if the disabled attribute is true", function() {
+QUnit.test("should become disabled if the disabled attribute is true", function() {
append();
ok(textArea.$().is(":not(:disabled)"));
@@ -53,7 +53,7 @@ test("should become disabled if the disabled attribute is true", function() {
ok(textArea.$().is(":not(:disabled)"));
});
-test("input value is updated when setting value property of view", function() {
+QUnit.test("input value is updated when setting value property of view", function() {
run(function() {
set(textArea, 'value', 'foo');
textArea.append();
@@ -66,7 +66,7 @@ test("input value is updated when setting value property of view", function() {
equal(textArea.$().val(), "bar", "updates text field after value changes");
});
-test("input placeholder is updated when setting placeholder property of view", function() {
+QUnit.test("input placeholder is updated when setting placeholder property of view", function() {
run(function() {
set(textArea, 'placeholder', 'foo');
textArea.append();
@@ -79,7 +79,7 @@ test("input placeholder is updated when setting placeholder property of view", f
equal(textArea.$().attr('placeholder'), "bar", "updates text area after placeholder changes");
});
-test("input name is updated when setting name property of view", function() {
+QUnit.test("input name is updated when setting name property of view", function() {
run(function() {
set(textArea, 'name', 'foo');
textArea.append();
@@ -92,7 +92,7 @@ test("input name is updated when setting name property of view", function() {
equal(textArea.$().attr('name'), "bar", "updates text area after name changes");
});
-test("input maxlength is updated when setting maxlength property of view", function() {
+QUnit.test("input maxlength is updated when setting maxlength property of view", function() {
run(function() {
set(textArea, 'maxlength', '300');
textArea.append();
@@ -105,7 +105,7 @@ test("input maxlength is updated when setting maxlength property of view", funct
equal(textArea.$().attr('maxlength'), "400", "updates text area after maxlength changes");
});
-test("input rows is updated when setting rows property of view", function() {
+QUnit.test("input rows is updated when setting rows property of view", function() {
run(function() {
set(textArea, 'rows', '3');
textArea.append();
@@ -118,7 +118,7 @@ test("input rows is updated when setting rows property of view", function() {
equal(textArea.$().attr('rows'), "4", "updates text area after rows changes");
});
-test("input cols is updated when setting cols property of view", function() {
+QUnit.test("input cols is updated when setting cols property of view", function() {
run(function() {
set(textArea, 'cols', '30');
textArea.append();
@@ -131,7 +131,7 @@ test("input cols is updated when setting cols property of view", function() {
equal(textArea.$().attr('cols'), "40", "updates text area after cols changes");
});
-test("input tabindex is updated when setting tabindex property of view", function() {
+QUnit.test("input tabindex is updated when setting tabindex property of view", function() {
run(function() {
set(textArea, 'tabindex', '4');
textArea.append();
@@ -144,7 +144,7 @@ test("input tabindex is updated when setting tabindex property of view", functio
equal(textArea.$().attr('tabindex'), "1", "updates text area after tabindex changes");
});
-test("input title is updated when setting title property of view", function() {
+QUnit.test("input title is updated when setting title property of view", function() {
run(function() {
set(textArea, 'title', 'FooTitle');
textArea.append();
@@ -155,7 +155,7 @@ test("input title is updated when setting title property of view", function() {
equal(textArea.$().attr('title'), 'BarTitle', "updates text area after title changes");
});
-test("value binding works properly for inputs that haven't been created", function() {
+QUnit.test("value binding works properly for inputs that haven't been created", function() {
run(function() {
textArea.destroy(); // destroy existing textarea
textArea = TextArea.createWithMixins({
@@ -179,7 +179,7 @@ test("value binding works properly for inputs that haven't been created", functi
});
forEach.call(['cut', 'paste', 'input'], function(eventName) {
- test("should update the value on " + eventName + " events", function() {
+ QUnit.test("should update the value on " + eventName + " events", function() {
run(function() {
textArea.append();
@@ -194,7 +194,7 @@ forEach.call(['cut', 'paste', 'input'], function(eventName) {
});
});
-test("should call the insertNewline method when return key is pressed", function() {
+QUnit.test("should call the insertNewline method when return key is pressed", function() {
var wasCalled;
var event = EmberObject.create({
keyCode: 13
@@ -210,7 +210,7 @@ test("should call the insertNewline method when return key is pressed", function
ok(wasCalled, "invokes insertNewline method");
});
-test("should call the cancel method when escape key is pressed", function() {
+QUnit.test("should call the cancel method when escape key is pressed", function() {
var wasCalled;
var event = EmberObject.create({
keyCode: 27
diff --git a/packages/ember-views/tests/views/text_field_test.js b/packages/ember-views/tests/views/text_field_test.js
index 7aa61d23039..1ee763e5772 100644
--- a/packages/ember-views/tests/views/text_field_test.js
+++ b/packages/ember-views/tests/views/text_field_test.js
@@ -79,14 +79,14 @@ QUnit.module("Ember.TextField", {
}
});
-test("should become disabled if the disabled attribute is true before append", function() {
+QUnit.test("should become disabled if the disabled attribute is true before append", function() {
textField.set('disabled', true);
append();
ok(textField.$().is(":disabled"));
});
-test("should become disabled if the disabled attribute is true", function() {
+QUnit.test("should become disabled if the disabled attribute is true", function() {
append();
ok(textField.$().is(":not(:disabled)"));
@@ -97,7 +97,7 @@ test("should become disabled if the disabled attribute is true", function() {
ok(textField.$().is(":not(:disabled)"));
});
-test("input value is updated when setting value property of view", function() {
+QUnit.test("input value is updated when setting value property of view", function() {
run(function() {
set(textField, 'value', 'foo');
textField.append();
@@ -110,7 +110,7 @@ test("input value is updated when setting value property of view", function() {
equal(textField.$().val(), "bar", "updates text field after value changes");
});
-test("input placeholder is updated when setting placeholder property of view", function() {
+QUnit.test("input placeholder is updated when setting placeholder property of view", function() {
run(function() {
set(textField, 'placeholder', 'foo');
textField.append();
@@ -123,7 +123,7 @@ test("input placeholder is updated when setting placeholder property of view", f
equal(textField.$().attr('placeholder'), "bar", "updates text field after placeholder changes");
});
-test("input name is updated when setting name property of view", function() {
+QUnit.test("input name is updated when setting name property of view", function() {
run(function() {
set(textField, 'name', 'foo');
textField.append();
@@ -136,7 +136,7 @@ test("input name is updated when setting name property of view", function() {
equal(textField.$().attr('name'), "bar", "updates text field after name changes");
});
-test("input maxlength is updated when setting maxlength property of view", function() {
+QUnit.test("input maxlength is updated when setting maxlength property of view", function() {
run(function() {
set(textField, 'maxlength', '30');
textField.append();
@@ -149,7 +149,7 @@ test("input maxlength is updated when setting maxlength property of view", funct
equal(textField.$().attr('maxlength'), "40", "updates text field after maxlength changes");
});
-test("input size is updated when setting size property of view", function() {
+QUnit.test("input size is updated when setting size property of view", function() {
run(function() {
set(textField, 'size', '30');
textField.append();
@@ -162,7 +162,7 @@ test("input size is updated when setting size property of view", function() {
equal(textField.$().attr('size'), "40", "updates text field after size changes");
});
-test("input tabindex is updated when setting tabindex property of view", function() {
+QUnit.test("input tabindex is updated when setting tabindex property of view", function() {
run(function() {
set(textField, 'tabindex', '5');
textField.append();
@@ -175,7 +175,7 @@ test("input tabindex is updated when setting tabindex property of view", functio
equal(textField.$().attr('tabindex'), "3", "updates text field after tabindex changes");
});
-test("input title is updated when setting title property of view", function() {
+QUnit.test("input title is updated when setting title property of view", function() {
run(function() {
set(textField, 'title', 'FooTitle');
textField.append();
@@ -188,7 +188,7 @@ test("input title is updated when setting title property of view", function() {
equal(textField.$().attr('title'), "BarTitle", "updates text field after title changes");
});
-test("input type is configurable when creating view", function() {
+QUnit.test("input type is configurable when creating view", function() {
run(function() {
set(textField, 'type', 'password');
textField.append();
@@ -197,7 +197,7 @@ test("input type is configurable when creating view", function() {
equal(textField.$().attr('type'), 'password', "renders text field with type");
});
-test("value binding works properly for inputs that haven't been created", function() {
+QUnit.test("value binding works properly for inputs that haven't been created", function() {
run(function() {
textField.destroy(); // destroy existing textField
@@ -221,7 +221,7 @@ test("value binding works properly for inputs that haven't been created", functi
equal(textField.$().val(), 'ohai', "value is reflected in the input element once it is created");
});
-test("value binding sets value on the element", function() {
+QUnit.test("value binding sets value on the element", function() {
run(function() {
textField.destroy(); // destroy existing textField
textField = TextField.createWithMixins({
@@ -251,7 +251,7 @@ test("value binding sets value on the element", function() {
equal(textField.$().val(), 'via view', "dom property was properly updated via view");
});
-test("should call the insertNewline method when return key is pressed", function() {
+QUnit.test("should call the insertNewline method when return key is pressed", function() {
var wasCalled;
var event = EmberObject.create({
keyCode: 13
@@ -267,7 +267,7 @@ test("should call the insertNewline method when return key is pressed", function
ok(wasCalled, "invokes insertNewline method");
});
-test("should call the cancel method when escape key is pressed", function() {
+QUnit.test("should call the cancel method when escape key is pressed", function() {
var wasCalled;
var event = EmberObject.create({
keyCode: 27
@@ -283,7 +283,7 @@ test("should call the cancel method when escape key is pressed", function() {
ok(wasCalled, "invokes cancel method");
});
-test("should send an action if one is defined when the return key is pressed", function() {
+QUnit.test("should send an action if one is defined when the return key is pressed", function() {
expect(2);
var StubController = EmberObject.extend({
@@ -307,7 +307,7 @@ test("should send an action if one is defined when the return key is pressed", f
textField.trigger('keyUp', event);
});
-test("should send an action on keyPress if one is defined with onEvent=keyPress", function() {
+QUnit.test("should send an action on keyPress if one is defined with onEvent=keyPress", function() {
expect(2);
var StubController = EmberObject.extend({
@@ -333,7 +333,7 @@ test("should send an action on keyPress if one is defined with onEvent=keyPress"
});
-test("bubbling of handled actions can be enabled via bubbles property", function() {
+QUnit.test("bubbling of handled actions can be enabled via bubbles property", function() {
textField.set('bubbles', true);
textField.set('action', 'didTriggerAction');
@@ -390,7 +390,7 @@ QUnit.module("Ember.TextField - Action events", {
}
});
-test("when the text field is blurred, the `focus-out` action is sent to the controller", function() {
+QUnit.test("when the text field is blurred, the `focus-out` action is sent to the controller", function() {
expect(1);
textField = TextField.create({
@@ -406,7 +406,7 @@ test("when the text field is blurred, the `focus-out` action is sent to the cont
});
-test("when the text field is focused, the `focus-in` action is sent to the controller", function() {
+QUnit.test("when the text field is focused, the `focus-in` action is sent to the controller", function() {
expect(1);
textField = TextField.create({
@@ -423,7 +423,7 @@ test("when the text field is focused, the `focus-in` action is sent to the contr
});
-test("when the user presses a key, the `key-press` action is sent to the controller", function() {
+QUnit.test("when the user presses a key, the `key-press` action is sent to the controller", function() {
expect(1);
textField = TextField.create({
@@ -441,7 +441,7 @@ test("when the user presses a key, the `key-press` action is sent to the control
});
-test("when the user inserts a new line, the `insert-newline` action is sent to the controller", function() {
+QUnit.test("when the user inserts a new line, the `insert-newline` action is sent to the controller", function() {
expect(1);
textField = TextField.create({
@@ -460,7 +460,7 @@ test("when the user inserts a new line, the `insert-newline` action is sent to t
});
-test("when the user presses the `enter` key, the `enter` action is sent to the controller", function() {
+QUnit.test("when the user presses the `enter` key, the `enter` action is sent to the controller", function() {
expect(1);
textField = TextField.create({
@@ -478,7 +478,7 @@ test("when the user presses the `enter` key, the `enter` action is sent to the c
});
-test("when the user hits escape, the `escape-press` action is sent to the controller", function() {
+QUnit.test("when the user hits escape, the `escape-press` action is sent to the controller", function() {
expect(1);
textField = TextField.create({
@@ -496,7 +496,7 @@ test("when the user hits escape, the `escape-press` action is sent to the contro
});
-test("when the user presses a key, the `key-down` action is sent to the controller", function() {
+QUnit.test("when the user presses a key, the `key-down` action is sent to the controller", function() {
expect(3);
var event;
@@ -521,7 +521,7 @@ test("when the user presses a key, the `key-down` action is sent to the controll
});
});
-test("when the user releases a key, the `key-up` action is sent to the controller", function() {
+QUnit.test("when the user releases a key, the `key-up` action is sent to the controller", function() {
expect(3);
var event;
@@ -546,7 +546,7 @@ test("when the user releases a key, the `key-up` action is sent to the controlle
});
});
-test('should not reset cursor position when text field receives keyUp event', function() {
+QUnit.test('should not reset cursor position when text field receives keyUp event', function() {
view = TextField.create({
value: 'Broseidon, King of the Brocean'
});
diff --git a/packages/ember-views/tests/views/view/actions_test.js b/packages/ember-views/tests/views/view/actions_test.js
index 350881cbff1..f9f78992a01 100644
--- a/packages/ember-views/tests/views/view/actions_test.js
+++ b/packages/ember-views/tests/views/view/actions_test.js
@@ -14,7 +14,7 @@ QUnit.module("View action handling", {
}
});
-test("Action can be handled by a function on actions object", function() {
+QUnit.test("Action can be handled by a function on actions object", function() {
expect(1);
view = View.extend({
actions: {
@@ -26,7 +26,7 @@ test("Action can be handled by a function on actions object", function() {
view.send("poke");
});
-test("A handled action can be bubbled to the target for continued processing", function() {
+QUnit.test("A handled action can be bubbled to the target for continued processing", function() {
expect(2);
view = View.extend({
actions: {
@@ -46,7 +46,7 @@ test("A handled action can be bubbled to the target for continued processing", f
view.send("poke");
});
-test("Action can be handled by a superclass' actions object", function() {
+QUnit.test("Action can be handled by a superclass' actions object", function() {
expect(4);
var SuperView = View.extend({
@@ -83,7 +83,7 @@ test("Action can be handled by a superclass' actions object", function() {
view.send("baz");
});
-test("Actions cannot be provided at create time", function() {
+QUnit.test("Actions cannot be provided at create time", function() {
expectAssertion(function() {
view = View.create({
actions: {
diff --git a/packages/ember-views/tests/views/view/append_to_test.js b/packages/ember-views/tests/views/view/append_to_test.js
index 5a464ef8ff5..31deafc7f05 100644
--- a/packages/ember-views/tests/views/view/append_to_test.js
+++ b/packages/ember-views/tests/views/view/append_to_test.js
@@ -19,7 +19,7 @@ QUnit.module("EmberView - append() and appendTo()", {
}
});
-test("should be added to the specified element when calling appendTo()", function() {
+QUnit.test("should be added to the specified element when calling appendTo()", function() {
jQuery("#qunit-fixture").html('');
view = View.create();
@@ -34,7 +34,7 @@ test("should be added to the specified element when calling appendTo()", functio
ok(viewElem.length > 0, "creates and appends the view's element");
});
-test("should be added to the document body when calling append()", function() {
+QUnit.test("should be added to the document body when calling append()", function() {
view = View.create({
render: function(buffer) {
buffer.push("foo bar baz");
@@ -51,7 +51,7 @@ test("should be added to the document body when calling append()", function() {
ok(viewElem.length > 0, "creates and appends the view's element");
});
-test("raises an assert when a target does not exist in the DOM", function() {
+QUnit.test("raises an assert when a target does not exist in the DOM", function() {
view = View.create();
expectAssertion(function() {
@@ -61,7 +61,7 @@ test("raises an assert when a target does not exist in the DOM", function() {
});
});
-test("append calls willInsertElement and didInsertElement callbacks", function() {
+QUnit.test("append calls willInsertElement and didInsertElement callbacks", function() {
var willInsertElementCalled = false;
var willInsertElementCalledInChild = false;
var didInsertElementCalled = false;
@@ -93,7 +93,7 @@ test("append calls willInsertElement and didInsertElement callbacks", function()
ok(didInsertElementCalled, "didInsertElement called");
});
-test("remove removes an element from the DOM", function() {
+QUnit.test("remove removes an element from the DOM", function() {
willDestroyCalled = 0;
view = View.create({
@@ -120,7 +120,7 @@ test("remove removes an element from the DOM", function() {
equal(willDestroyCalled, 1, "the willDestroyElement hook was called once");
});
-test("destroy more forcibly removes the view", function() {
+QUnit.test("destroy more forcibly removes the view", function() {
willDestroyCalled = 0;
view = View.create({
@@ -167,7 +167,7 @@ QUnit.module("EmberView - append() and appendTo() in a view hierarchy", {
}
});
-test("should be added to the specified element when calling appendTo()", function() {
+QUnit.test("should be added to the specified element when calling appendTo()", function() {
jQuery("#qunit-fixture").html('');
view = View.create();
@@ -182,7 +182,7 @@ test("should be added to the specified element when calling appendTo()", functio
ok(viewElem.length > 0, "creates and appends the view's element");
});
-test("should be added to the document body when calling append()", function() {
+QUnit.test("should be added to the document body when calling append()", function() {
jQuery("#qunit-fixture").html('');
view = View.create();
@@ -222,7 +222,7 @@ QUnit.module("EmberView - removing views in a view hierarchy", {
}
});
-test("remove removes child elements from the DOM", function() {
+QUnit.test("remove removes child elements from the DOM", function() {
ok(!get(childView, 'element'), "precond - should not have an element");
run(function() {
@@ -242,7 +242,7 @@ test("remove removes child elements from the DOM", function() {
equal(willDestroyCalled, 1, "the willDestroyElement hook was called once");
});
-test("destroy more forcibly removes child views", function() {
+QUnit.test("destroy more forcibly removes child views", function() {
ok(!get(childView, 'element'), "precond - should not have an element");
run(function() {
@@ -264,7 +264,7 @@ test("destroy more forcibly removes child views", function() {
equal(willDestroyCalled, 1, "the willDestroyElement hook was called once on children");
});
-test("destroy removes a child view from its parent", function() {
+QUnit.test("destroy removes a child view from its parent", function() {
ok(!get(childView, 'element'), "precond - should not have an element");
run(function() {
diff --git a/packages/ember-views/tests/views/view/attribute_bindings_test.js b/packages/ember-views/tests/views/view/attribute_bindings_test.js
index 243c48f311f..d76df442a5e 100644
--- a/packages/ember-views/tests/views/view/attribute_bindings_test.js
+++ b/packages/ember-views/tests/views/view/attribute_bindings_test.js
@@ -28,7 +28,7 @@ QUnit.module("EmberView - Attribute Bindings", {
}
});
-test("should render attribute bindings", function() {
+QUnit.test("should render attribute bindings", function() {
view = EmberView.create({
classNameBindings: ['priority', 'isUrgent', 'isClassified:classified', 'canIgnore'],
attributeBindings: ['type', 'isDisabled:disabled', 'exploded', 'destroyed', 'exists', 'nothing', 'notDefined', 'notNumber', 'explosions'],
@@ -57,7 +57,7 @@ test("should render attribute bindings", function() {
ok(!view.$().attr('notNumber'), "removes notNumber attribute when NaN");
});
-test("should normalize case for attribute bindings", function() {
+QUnit.test("should normalize case for attribute bindings", function() {
view = EmberView.create({
tagName: 'input',
attributeBindings: ['disAbled'],
@@ -72,7 +72,7 @@ test("should normalize case for attribute bindings", function() {
ok(view.$().prop('disabled'), "sets property with correct case");
});
-test("should update attribute bindings", function() {
+QUnit.test("should update attribute bindings", function() {
view = EmberView.create({
classNameBindings: ['priority', 'isUrgent', 'isClassified:classified', 'canIgnore'],
attributeBindings: ['type', 'isDisabled:disabled', 'exploded', 'destroyed', 'exists', 'nothing', 'notDefined', 'notNumber', 'explosions'],
@@ -123,7 +123,7 @@ test("should update attribute bindings", function() {
ok(!view.$().attr('notNumber'), "removes notNumber attribute when NaN");
});
-test("should update attribute bindings on svg", function() {
+QUnit.test("should update attribute bindings on svg", function() {
view = EmberView.create({
attributeBindings: ['viewBox'],
viewBox: null
@@ -145,7 +145,7 @@ test("should update attribute bindings on svg", function() {
// This comes into play when using the {{#each}} helper. If the
// passed array item is a String, it will be converted into a
// String object instead of a normal string.
-test("should allow binding to String objects", function() {
+QUnit.test("should allow binding to String objects", function() {
view = EmberView.create({
attributeBindings: ['foo'],
// JSHint doesn't like `new String` so we'll create it the same way it gets created in practice
@@ -166,7 +166,7 @@ test("should allow binding to String objects", function() {
ok(!view.$().attr('foo'), "removes foo attribute when false");
});
-test("should teardown observers on rerender", function() {
+QUnit.test("should teardown observers on rerender", function() {
view = EmberView.create({
attributeBindings: ['foo'],
classNameBindings: ['foo'],
@@ -184,7 +184,7 @@ test("should teardown observers on rerender", function() {
equal(observersFor(view, 'foo').length, 2);
});
-test("handles attribute bindings for properties", function() {
+QUnit.test("handles attribute bindings for properties", function() {
view = EmberView.create({
attributeBindings: ['checked'],
checked: null
@@ -207,7 +207,7 @@ test("handles attribute bindings for properties", function() {
equal(!!view.$().prop('checked'), false, 'changes to unchecked');
});
-test("handles `undefined` value for properties", function() {
+QUnit.test("handles `undefined` value for properties", function() {
view = EmberView.create({
attributeBindings: ['value'],
value: "test"
@@ -224,7 +224,7 @@ test("handles `undefined` value for properties", function() {
equal(!!view.$().prop('value'), false, "value is not defined");
});
-test("handles null value for attributes on text fields", function() {
+QUnit.test("handles null value for attributes on text fields", function() {
view = EmberView.create({
tagName: 'input',
attributeBindings: ['value']
@@ -243,7 +243,7 @@ test("handles null value for attributes on text fields", function() {
equal(!!view.$().prop('value'), false, "value is not defined");
});
-test("handles a 0 value attribute on text fields", function() {
+QUnit.test("handles a 0 value attribute on text fields", function() {
view = EmberView.create({
tagName: 'input',
attributeBindings: ['value']
@@ -260,7 +260,7 @@ test("handles a 0 value attribute on text fields", function() {
strictEqual(view.$().prop('value'), "0", "value should be 0");
});
-test("attributeBindings should not fail if view has been removed", function() {
+QUnit.test("attributeBindings should not fail if view has been removed", function() {
run(function() {
view = EmberView.create({
attributeBindings: ['checked'],
@@ -284,7 +284,7 @@ test("attributeBindings should not fail if view has been removed", function() {
ok(!error, error);
});
-test("attributeBindings should not fail if view has been destroyed", function() {
+QUnit.test("attributeBindings should not fail if view has been destroyed", function() {
run(function() {
view = EmberView.create({
attributeBindings: ['checked'],
@@ -308,7 +308,7 @@ test("attributeBindings should not fail if view has been destroyed", function()
ok(!error, error);
});
-test("asserts if an attributeBinding is setup on class", function() {
+QUnit.test("asserts if an attributeBinding is setup on class", function() {
view = EmberView.create({
attributeBindings: ['class']
});
@@ -318,7 +318,7 @@ test("asserts if an attributeBinding is setup on class", function() {
}, 'You cannot use class as an attributeBinding, use classNameBindings instead.');
});
-test("blacklists href bindings based on protocol", function() {
+QUnit.test("blacklists href bindings based on protocol", function() {
/* jshint scripturl:true */
view = EmberView.create({
diff --git a/packages/ember-views/tests/views/view/child_views_test.js b/packages/ember-views/tests/views/view/child_views_test.js
index 7720c400cd9..6966e7b4c72 100644
--- a/packages/ember-views/tests/views/view/child_views_test.js
+++ b/packages/ember-views/tests/views/view/child_views_test.js
@@ -30,7 +30,7 @@ QUnit.module('tests/views/view/child_views_tests.js', {
// parent element
// no parent element, no buffer, no element
-test("should render an inserted child view when the child is inserted before a DOM element is created", function() {
+QUnit.test("should render an inserted child view when the child is inserted before a DOM element is created", function() {
run(function() {
parentView.append();
});
@@ -38,7 +38,7 @@ test("should render an inserted child view when the child is inserted before a D
equal(parentView.$().text(), 'Ember', 'renders the child view after the parent view');
});
-test("should not duplicate childViews when rerendering", function() {
+QUnit.test("should not duplicate childViews when rerendering", function() {
var Inner = EmberView.extend({
template: function() { return ''; }
diff --git a/packages/ember-views/tests/views/view/class_name_bindings_test.js b/packages/ember-views/tests/views/view/class_name_bindings_test.js
index 984b759302b..01ca8468178 100644
--- a/packages/ember-views/tests/views/view/class_name_bindings_test.js
+++ b/packages/ember-views/tests/views/view/class_name_bindings_test.js
@@ -15,7 +15,7 @@ QUnit.module("EmberView - Class Name Bindings", {
}
});
-test("should apply bound class names to the element", function() {
+QUnit.test("should apply bound class names to the element", function() {
view = EmberView.create({
classNameBindings: ['priority', 'isUrgent', 'isClassified:classified',
'canIgnore', 'messages.count', 'messages.resent:is-resent',
@@ -55,7 +55,7 @@ test("should apply bound class names to the element", function() {
ok(!view.$().hasClass('disabled'), "does not add class name for negated binding");
});
-test("should add, remove, or change class names if changed after element is created", function() {
+QUnit.test("should add, remove, or change class names if changed after element is created", function() {
view = EmberView.create({
classNameBindings: ['priority', 'isUrgent', 'isClassified:classified',
'canIgnore', 'messages.count', 'messages.resent:is-resent',
@@ -98,7 +98,7 @@ test("should add, remove, or change class names if changed after element is crea
ok(view.$().hasClass('disabled'), "adds negated class name for negated binding");
});
-test(":: class name syntax works with an empty true class", function() {
+QUnit.test(":: class name syntax works with an empty true class", function() {
view = EmberView.create({
isEnabled: false,
classNameBindings: ['isEnabled::not-enabled']
@@ -113,7 +113,7 @@ test(":: class name syntax works with an empty true class", function() {
equal(view.$().attr('class'), 'ember-view', "no class is added when property is true and the class is empty");
});
-test("classNames should not be duplicated on rerender", function() {
+QUnit.test("classNames should not be duplicated on rerender", function() {
run(function() {
view = EmberView.create({
classNameBindings: ['priority'],
@@ -135,7 +135,7 @@ test("classNames should not be duplicated on rerender", function() {
equal(view.$().attr('class'), 'ember-view high');
});
-test("classNameBindings should work when the binding property is updated and the view has been removed of the DOM", function() {
+QUnit.test("classNameBindings should work when the binding property is updated and the view has been removed of the DOM", function() {
run(function() {
view = EmberView.create({
classNameBindings: ['priority'],
@@ -164,7 +164,7 @@ test("classNameBindings should work when the binding property is updated and the
});
-test("classNames removed by a classNameBindings observer should not re-appear on rerender", function() {
+QUnit.test("classNames removed by a classNameBindings observer should not re-appear on rerender", function() {
view = EmberView.create({
classNameBindings: ['isUrgent'],
isUrgent: true
@@ -189,7 +189,7 @@ test("classNames removed by a classNameBindings observer should not re-appear on
equal(view.$().attr('class'), 'ember-view');
});
-test("classNameBindings lifecycle test", function() {
+QUnit.test("classNameBindings lifecycle test", function() {
run(function() {
view = EmberView.create({
classNameBindings: ['priority'],
@@ -214,7 +214,7 @@ test("classNameBindings lifecycle test", function() {
equal(isWatching(view, 'priority'), false);
});
-test("classNameBindings should not fail if view has been removed", function() {
+QUnit.test("classNameBindings should not fail if view has been removed", function() {
run(function() {
view = EmberView.create({
classNameBindings: ['priority'],
@@ -238,7 +238,7 @@ test("classNameBindings should not fail if view has been removed", function() {
ok(!error, error);
});
-test("classNameBindings should not fail if view has been destroyed", function() {
+QUnit.test("classNameBindings should not fail if view has been destroyed", function() {
run(function() {
view = EmberView.create({
classNameBindings: ['priority'],
@@ -262,7 +262,7 @@ test("classNameBindings should not fail if view has been destroyed", function()
ok(!error, error);
});
-test("Providing a binding with a space in it asserts", function() {
+QUnit.test("Providing a binding with a space in it asserts", function() {
view = EmberView.create({
classNameBindings: 'i:think:i am:so:clever'
});
diff --git a/packages/ember-views/tests/views/view/context_test.js b/packages/ember-views/tests/views/view/context_test.js
index f97fe615814..e8ec7b216ae 100644
--- a/packages/ember-views/tests/views/view/context_test.js
+++ b/packages/ember-views/tests/views/view/context_test.js
@@ -5,7 +5,7 @@ import ContainerView from "ember-views/views/container_view";
QUnit.module("EmberView - context property");
-test("setting a controller on an inner view should change it context", function() {
+QUnit.test("setting a controller on an inner view should change it context", function() {
var App = {};
var a = { name: 'a' };
var b = { name: 'b' };
diff --git a/packages/ember-views/tests/views/view/controller_test.js b/packages/ember-views/tests/views/view/controller_test.js
index cfc81afd941..45cc3371d70 100644
--- a/packages/ember-views/tests/views/view/controller_test.js
+++ b/packages/ember-views/tests/views/view/controller_test.js
@@ -4,7 +4,7 @@ import ContainerView from "ember-views/views/container_view";
QUnit.module("Ember.View - controller property");
-test("controller property should be inherited from nearest ancestor with controller", function() {
+QUnit.test("controller property should be inherited from nearest ancestor with controller", function() {
var grandparent = ContainerView.create();
var parent = ContainerView.create();
var child = ContainerView.create();
diff --git a/packages/ember-views/tests/views/view/create_child_view_test.js b/packages/ember-views/tests/views/view/create_child_view_test.js
index 55e7deb9baf..c30d964d27d 100644
--- a/packages/ember-views/tests/views/view/create_child_view_test.js
+++ b/packages/ember-views/tests/views/view/create_child_view_test.js
@@ -23,7 +23,7 @@ QUnit.module("EmberView#createChildView", {
}
});
-test("should create view from class with any passed attributes", function() {
+QUnit.test("should create view from class with any passed attributes", function() {
var attrs = {
foo: "baz"
};
@@ -36,14 +36,14 @@ test("should create view from class with any passed attributes", function() {
ok(!attrs.parentView, "the original attributes hash was not mutated");
});
-test("should set newView.parentView to receiver", function() {
+QUnit.test("should set newView.parentView to receiver", function() {
newView = view.createChildView(myViewClass);
equal(newView.container, container, 'expects to share container with parent');
equal(get(newView, 'parentView'), view, 'newView.parentView == view');
});
-test("should create property on parentView to a childView instance if provided a viewName", function() {
+QUnit.test("should create property on parentView to a childView instance if provided a viewName", function() {
var attrs = {
viewName: "someChildView"
};
@@ -54,7 +54,7 @@ test("should create property on parentView to a childView instance if provided a
equal(get(view, 'someChildView'), newView);
});
-test("should update a view instances attributes, including the _parentView and container properties", function() {
+QUnit.test("should update a view instances attributes, including the _parentView and container properties", function() {
var attrs = {
foo: "baz"
};
@@ -69,7 +69,7 @@ test("should update a view instances attributes, including the _parentView and c
deepEqual(newView, myView);
});
-test("should create from string via container lookup", function() {
+QUnit.test("should create from string via container lookup", function() {
var ChildViewClass = EmberView.extend();
var fullName = 'view:bro';
@@ -87,7 +87,7 @@ test("should create from string via container lookup", function() {
equal(newView._parentView, view, 'expects to have the correct parent');
});
-test("should assert when trying to create childView from string, but no such view is registered", function() {
+QUnit.test("should assert when trying to create childView from string, but no such view is registered", function() {
view.container.lookupFactory = function() {};
expectAssertion(function() {
diff --git a/packages/ember-views/tests/views/view/create_element_test.js b/packages/ember-views/tests/views/view/create_element_test.js
index 9c7a9ce6916..5f1ecc7dde2 100644
--- a/packages/ember-views/tests/views/view/create_element_test.js
+++ b/packages/ember-views/tests/views/view/create_element_test.js
@@ -14,7 +14,7 @@ QUnit.module("Ember.View#createElement", {
}
});
-test("returns the receiver", function() {
+QUnit.test("returns the receiver", function() {
var ret;
view = EmberView.create();
@@ -26,7 +26,7 @@ test("returns the receiver", function() {
equal(ret, view, 'returns receiver');
});
-test('should assert if `tagName` is an empty string and `classNameBindings` are specified', function() {
+QUnit.test('should assert if `tagName` is an empty string and `classNameBindings` are specified', function() {
expect(1);
view = EmberView.create({
@@ -42,7 +42,7 @@ test('should assert if `tagName` is an empty string and `classNameBindings` are
}, /You cannot use `classNameBindings` on a tag-less view/);
});
-test("calls render and turns resultant string into element", function() {
+QUnit.test("calls render and turns resultant string into element", function() {
view = EmberView.create({
tagName: 'span',
@@ -63,7 +63,7 @@ test("calls render and turns resultant string into element", function() {
equal(elem.tagName.toString().toLowerCase(), 'span', 'has tagName from view');
});
-test("calls render and parses the buffer string in the right context", function() {
+QUnit.test("calls render and parses the buffer string in the right context", function() {
expectDeprecation("Setting `childViews` on a Container is deprecated.");
view = ContainerView.create({
@@ -91,7 +91,7 @@ test("calls render and parses the buffer string in the right context", function(
equalHTML(elem.childNodes, '
snorfblax |
', 'has innerHTML from context');
});
-test("does not wrap many tr children in tbody elements", function() {
+QUnit.test("does not wrap many tr children in tbody elements", function() {
expectDeprecation("Setting `childViews` on a Container is deprecated.");
view = ContainerView.create({
@@ -124,7 +124,7 @@ test("does not wrap many tr children in tbody elements", function() {
equal(elem.tagName.toString().toLowerCase(), 'table', 'has tagName from view');
});
-test("generated element include HTML from child views as well", function() {
+QUnit.test("generated element include HTML from child views as well", function() {
expectDeprecation("Setting `childViews` on a Container is deprecated.");
view = ContainerView.create({
diff --git a/packages/ember-views/tests/views/view/destroy_element_test.js b/packages/ember-views/tests/views/view/destroy_element_test.js
index 1830ee8c1b3..b7f0377f98d 100644
--- a/packages/ember-views/tests/views/view/destroy_element_test.js
+++ b/packages/ember-views/tests/views/view/destroy_element_test.js
@@ -13,7 +13,7 @@ QUnit.module("EmberView#destroyElement", {
}
});
-test("if it has no element, does nothing", function() {
+QUnit.test("if it has no element, does nothing", function() {
var callCount = 0;
view = EmberView.create({
willDestroyElement: function() { callCount++; }
@@ -28,7 +28,7 @@ test("if it has no element, does nothing", function() {
equal(callCount, 0, 'did not invoke callback');
});
-test("if it has a element, calls willDestroyElement on receiver and child views then deletes the element", function() {
+QUnit.test("if it has a element, calls willDestroyElement on receiver and child views then deletes the element", function() {
expectDeprecation("Setting `childViews` on a Container is deprecated.");
var parentCount = 0;
@@ -60,7 +60,7 @@ test("if it has a element, calls willDestroyElement on receiver and child views
ok(!get(get(view, 'childViews').objectAt(0), 'element'), 'child no longer has an element');
});
-test("returns receiver", function() {
+QUnit.test("returns receiver", function() {
var ret;
view = EmberView.create();
@@ -72,7 +72,7 @@ test("returns receiver", function() {
equal(ret, view, 'returns receiver');
});
-test("removes element from parentNode if in DOM", function() {
+QUnit.test("removes element from parentNode if in DOM", function() {
view = EmberView.create();
run(function() {
diff --git a/packages/ember-views/tests/views/view/destroy_test.js b/packages/ember-views/tests/views/view/destroy_test.js
index 5ebb6611760..ba032cdd183 100644
--- a/packages/ember-views/tests/views/view/destroy_test.js
+++ b/packages/ember-views/tests/views/view/destroy_test.js
@@ -4,7 +4,7 @@ import EmberView from "ember-views/views/view";
QUnit.module("Ember.View#destroy");
-test("should teardown viewName on parentView when childView is destroyed", function() {
+QUnit.test("should teardown viewName on parentView when childView is destroyed", function() {
var viewName = "someChildView";
var parentView = EmberView.create();
var childView = parentView.createChildView(EmberView, { viewName: viewName });
diff --git a/packages/ember-views/tests/views/view/element_test.js b/packages/ember-views/tests/views/view/element_test.js
index 8af4f74d51b..030e3f288d9 100644
--- a/packages/ember-views/tests/views/view/element_test.js
+++ b/packages/ember-views/tests/views/view/element_test.js
@@ -16,13 +16,13 @@ QUnit.module("Ember.View#element", {
}
});
-test("returns null if the view has no element and no parent view", function() {
+QUnit.test("returns null if the view has no element and no parent view", function() {
view = EmberView.create();
equal(get(view, 'parentView'), null, 'precond - has no parentView');
equal(get(view, 'element'), null, 'has no element');
});
-test("returns null if the view has no element and parent view has no element", function() {
+QUnit.test("returns null if the view has no element and parent view has no element", function() {
expectDeprecation("Setting `childViews` on a Container is deprecated.");
parentView = ContainerView.create({
@@ -35,7 +35,7 @@ test("returns null if the view has no element and parent view has no element", f
equal(get(view, 'element'), null, ' has no element');
});
-test("returns element if you set the value", function() {
+QUnit.test("returns element if you set the value", function() {
view = EmberView.create();
equal(get(view, 'element'), null, 'precond- has no element');
@@ -46,7 +46,7 @@ test("returns element if you set the value", function() {
});
Ember.runInDebug(function() {
- test("should not allow the elementId to be changed after inserted", function() {
+ QUnit.test("should not allow the elementId to be changed after inserted", function() {
view = EmberView.create({
elementId: 'one'
});
diff --git a/packages/ember-views/tests/views/view/evented_test.js b/packages/ember-views/tests/views/view/evented_test.js
index 1f2caeeb454..1384545128c 100644
--- a/packages/ember-views/tests/views/view/evented_test.js
+++ b/packages/ember-views/tests/views/view/evented_test.js
@@ -12,7 +12,7 @@ QUnit.module("EmberView evented helpers", {
}
});
-test("fire should call method sharing event name if it exists on the view", function() {
+QUnit.test("fire should call method sharing event name if it exists on the view", function() {
var eventFired = false;
view = EmberView.create({
@@ -32,7 +32,7 @@ test("fire should call method sharing event name if it exists on the view", func
equal(eventFired, true, "fired the view method sharing the event name");
});
-test("fire does not require a view method with the same name", function() {
+QUnit.test("fire does not require a view method with the same name", function() {
var eventFired = false;
view = EmberView.create({
diff --git a/packages/ember-views/tests/views/view/init_test.js b/packages/ember-views/tests/views/view/init_test.js
index b5d669269b9..73cb4bfecd5 100644
--- a/packages/ember-views/tests/views/view/init_test.js
+++ b/packages/ember-views/tests/views/view/init_test.js
@@ -20,7 +20,7 @@ QUnit.module("EmberView.create", {
}
});
-test("registers view in the global views hash using layerId for event targeted", function() {
+QUnit.test("registers view in the global views hash using layerId for event targeted", function() {
view = EmberView.create();
run(function() {
view.appendTo('#qunit-fixture');
@@ -30,7 +30,7 @@ test("registers view in the global views hash using layerId for event targeted",
QUnit.module("EmberView.createWithMixins");
-test("should warn if a computed property is used for classNames", function() {
+QUnit.test("should warn if a computed property is used for classNames", function() {
expectAssertion(function() {
EmberView.createWithMixins({
elementId: 'test',
@@ -41,7 +41,7 @@ test("should warn if a computed property is used for classNames", function() {
}, /Only arrays of static class strings.*For dynamic classes/i);
});
-test("should warn if a non-array is used for classNameBindings", function() {
+QUnit.test("should warn if a non-array is used for classNameBindings", function() {
expectAssertion(function() {
EmberView.createWithMixins({
elementId: 'test',
@@ -52,7 +52,7 @@ test("should warn if a non-array is used for classNameBindings", function() {
}, /Only arrays are allowed/i);
});
-test("creates a renderer if one is not provided", function() {
+QUnit.test("creates a renderer if one is not provided", function() {
var childView;
view = EmberView.create({
diff --git a/packages/ember-views/tests/views/view/inject_test.js b/packages/ember-views/tests/views/view/inject_test.js
index 457113b7819..a027506695c 100644
--- a/packages/ember-views/tests/views/view/inject_test.js
+++ b/packages/ember-views/tests/views/view/inject_test.js
@@ -6,7 +6,7 @@ import View from "ember-views/views/view";
if (Ember.FEATURES.isEnabled('ember-metal-injected-properties')) {
QUnit.module('EmberView - injected properties');
- test("services can be injected into views", function() {
+ QUnit.test("services can be injected into views", function() {
var registry = new Registry();
var container = registry.container();
diff --git a/packages/ember-views/tests/views/view/is_visible_test.js b/packages/ember-views/tests/views/view/is_visible_test.js
index 0e05263d3ae..dd88796a2d0 100644
--- a/packages/ember-views/tests/views/view/is_visible_test.js
+++ b/packages/ember-views/tests/views/view/is_visible_test.js
@@ -15,7 +15,7 @@ QUnit.module("EmberView#isVisible", {
}
});
-test("should hide views when isVisible is false", function() {
+QUnit.test("should hide views when isVisible is false", function() {
view = EmberView.create({
isVisible: false
});
@@ -36,7 +36,7 @@ test("should hide views when isVisible is false", function() {
});
});
-test("should hide element if isVisible is false before element is created", function() {
+QUnit.test("should hide element if isVisible is false before element is created", function() {
view = EmberView.create({
isVisible: false
});
@@ -107,7 +107,7 @@ QUnit.module("EmberView#isVisible with Container", {
}
});
-test("view should be notified after isVisible is set to false and the element has been hidden", function() {
+QUnit.test("view should be notified after isVisible is set to false and the element has been hidden", function() {
run(function() {
view = View.create({ isVisible: false });
view.append();
@@ -125,7 +125,7 @@ test("view should be notified after isVisible is set to false and the element ha
equal(grandchildBecameVisible, 1);
});
-test("view should be notified after isVisible is set to false and the element has been hidden", function() {
+QUnit.test("view should be notified after isVisible is set to false and the element has been hidden", function() {
view = View.create({ isVisible: true });
var childView = view.get('childViews').objectAt(0);
@@ -145,7 +145,7 @@ test("view should be notified after isVisible is set to false and the element ha
equal(grandchildBecameHidden, 1);
});
-test("view should be notified after isVisible is set to true and the element has been shown", function() {
+QUnit.test("view should be notified after isVisible is set to true and the element has been shown", function() {
view = View.create({ isVisible: false });
run(function() {
@@ -165,7 +165,7 @@ test("view should be notified after isVisible is set to true and the element has
equal(grandchildBecameVisible, 1);
});
-test("if a view descends from a hidden view, making isVisible true should not trigger becameVisible", function() {
+QUnit.test("if a view descends from a hidden view, making isVisible true should not trigger becameVisible", function() {
view = View.create({ isVisible: true });
var childView = view.get('childViews').objectAt(0);
@@ -194,7 +194,7 @@ test("if a view descends from a hidden view, making isVisible true should not tr
equal(grandchildBecameVisible, 0, "the grandchild did not become visible");
});
-test("if a child view becomes visible while its parent is hidden, if its parent later becomes visible, it receives a becameVisible callback", function() {
+QUnit.test("if a child view becomes visible while its parent is hidden, if its parent later becomes visible, it receives a becameVisible callback", function() {
view = View.create({ isVisible: false });
var childView = view.get('childViews').objectAt(0);
diff --git a/packages/ember-views/tests/views/view/jquery_test.js b/packages/ember-views/tests/views/view/jquery_test.js
index de6ed0f567e..906792de253 100644
--- a/packages/ember-views/tests/views/view/jquery_test.js
+++ b/packages/ember-views/tests/views/view/jquery_test.js
@@ -23,7 +23,7 @@ QUnit.module("EmberView#$", {
}
});
-test("returns undefined if no element", function() {
+QUnit.test("returns undefined if no element", function() {
var view = EmberView.create();
ok(!get(view, 'element'), 'precond - should have no element');
equal(view.$(), undefined, 'should return undefined');
@@ -34,7 +34,7 @@ test("returns undefined if no element", function() {
});
});
-test("returns jQuery object selecting element if provided", function() {
+QUnit.test("returns jQuery object selecting element if provided", function() {
ok(get(view, 'element'), 'precond - should have element');
var jquery = view.$();
@@ -42,7 +42,7 @@ test("returns jQuery object selecting element if provided", function() {
equal(jquery[0], get(view, 'element'), 'element should be element');
});
-test("returns jQuery object selecting element inside element if provided", function() {
+QUnit.test("returns jQuery object selecting element inside element if provided", function() {
ok(get(view, 'element'), 'precond - should have element');
var jquery = view.$('span');
@@ -50,7 +50,7 @@ test("returns jQuery object selecting element inside element if provided", funct
equal(jquery[0].parentNode, get(view, 'element'), 'element should be in element');
});
-test("returns empty jQuery object if filter passed that does not match item in parent", function() {
+QUnit.test("returns empty jQuery object if filter passed that does not match item in parent", function() {
ok(get(view, 'element'), 'precond - should have element');
var jquery = view.$('body'); // would normally work if not scoped to view
diff --git a/packages/ember-views/tests/views/view/layout_test.js b/packages/ember-views/tests/views/view/layout_test.js
index 3a8ccd5ba71..e291e43e711 100644
--- a/packages/ember-views/tests/views/view/layout_test.js
+++ b/packages/ember-views/tests/views/view/layout_test.js
@@ -21,7 +21,7 @@ QUnit.module("EmberView - Layout Functionality", {
}
});
-test("Layout views return throw if their layout cannot be found", function() {
+QUnit.test("Layout views return throw if their layout cannot be found", function() {
view = EmberView.create({
layoutName: 'cantBeFound',
container: { lookup: function() { } }
@@ -32,7 +32,7 @@ test("Layout views return throw if their layout cannot be found", function() {
}, /cantBeFound/);
});
-test("should call the function of the associated layout", function() {
+QUnit.test("should call the function of the associated layout", function() {
var templateCalled = 0;
var layoutCalled = 0;
@@ -53,7 +53,7 @@ test("should call the function of the associated layout", function() {
equal(layoutCalled, 1, "layout is called when layout is present");
});
-test("should call the function of the associated template with itself as the context", function() {
+QUnit.test("should call the function of the associated template with itself as the context", function() {
registry.register('template:testTemplate', function(dataSource) {
return "
template was called for " + get(dataSource, 'personName') + "
";
});
@@ -74,7 +74,7 @@ test("should call the function of the associated template with itself as the con
equal("template was called for Tom DAAAALE", view.$('#twas-called').text(), "the named template was called with the view as the data source");
});
-test("should fall back to defaultTemplate if neither template nor templateName are provided", function() {
+QUnit.test("should fall back to defaultTemplate if neither template nor templateName are provided", function() {
var View;
View = EmberView.extend({
@@ -94,7 +94,7 @@ test("should fall back to defaultTemplate if neither template nor templateName a
equal("template was called for Tom DAAAALE", view.$('#twas-called').text(), "the named template was called with the view as the data source");
});
-test("should not use defaultLayout if layout is provided", function() {
+QUnit.test("should not use defaultLayout if layout is provided", function() {
var View;
View = EmberView.extend({
@@ -111,7 +111,7 @@ test("should not use defaultLayout if layout is provided", function() {
equal("foo", view.$().text(), "default layout was not printed");
});
-test("the template property is available to the layout template", function() {
+QUnit.test("the template property is available to the layout template", function() {
view = EmberView.create({
template: function(context, options) {
options.data.buffer.push(" derp");
diff --git a/packages/ember-views/tests/views/view/nearest_of_type_test.js b/packages/ember-views/tests/views/view/nearest_of_type_test.js
index a4f4451ebb0..bf442401abc 100644
--- a/packages/ember-views/tests/views/view/nearest_of_type_test.js
+++ b/packages/ember-views/tests/views/view/nearest_of_type_test.js
@@ -21,7 +21,7 @@ QUnit.module("View#nearest*", {
}
});
- test("nearestOfType should find the closest view by view class", function() {
+ QUnit.test("nearestOfType should find the closest view by view class", function() {
var child;
run(function() {
@@ -33,7 +33,7 @@ QUnit.module("View#nearest*", {
equal(child.nearestOfType(Parent), parentView, "finds closest view in the hierarchy by class");
});
- test("nearestOfType should find the closest view by mixin", function() {
+ QUnit.test("nearestOfType should find the closest view by mixin", function() {
var child;
run(function() {
@@ -45,7 +45,7 @@ QUnit.module("View#nearest*", {
equal(child.nearestOfType(Mixin), parentView, "finds closest view in the hierarchy by class");
});
- test("nearestWithProperty should search immediate parent", function() {
+ QUnit.test("nearestWithProperty should search immediate parent", function() {
var childView;
view = View.create({
@@ -65,7 +65,7 @@ QUnit.module("View#nearest*", {
});
- test("nearestChildOf should be deprecated", function() {
+ QUnit.test("nearestChildOf should be deprecated", function() {
var child;
run(function() {
diff --git a/packages/ember-views/tests/views/view/nested_view_ordering_test.js b/packages/ember-views/tests/views/view/nested_view_ordering_test.js
index 0e4920ea2b0..ae2c0f6c245 100644
--- a/packages/ember-views/tests/views/view/nested_view_ordering_test.js
+++ b/packages/ember-views/tests/views/view/nested_view_ordering_test.js
@@ -20,7 +20,7 @@ QUnit.module("EmberView - Nested View Ordering", {
}
});
-test("should call didInsertElement on child views before parent", function() {
+QUnit.test("should call didInsertElement on child views before parent", function() {
var insertedLast;
view = EmberView.create({
diff --git a/packages/ember-views/tests/views/view/remove_test.js b/packages/ember-views/tests/views/view/remove_test.js
index 10b8e4eaafd..f0078c26426 100644
--- a/packages/ember-views/tests/views/view/remove_test.js
+++ b/packages/ember-views/tests/views/view/remove_test.js
@@ -25,17 +25,17 @@ QUnit.module("View#removeChild", {
}
});
-test("returns receiver", function() {
+QUnit.test("returns receiver", function() {
equal(parentView.removeChild(child), parentView, 'receiver');
});
-test("removes child from parent.childViews array", function() {
+QUnit.test("removes child from parent.childViews array", function() {
ok(indexOf(get(parentView, 'childViews'), child)>=0, 'precond - has child in childViews array before remove');
parentView.removeChild(child);
ok(indexOf(get(parentView, 'childViews'), child)<0, 'removed child');
});
-test("sets parentView property to null", function() {
+QUnit.test("sets parentView property to null", function() {
ok(get(child, 'parentView'), 'precond - has parentView');
parentView.removeChild(child);
ok(!get(child, 'parentView'), 'parentView is now null');
@@ -62,14 +62,14 @@ QUnit.module("View#removeAllChildren", {
}
});
-test("removes all child views", function() {
+QUnit.test("removes all child views", function() {
equal(get(view, 'childViews.length'), 3, 'precond - has child views');
view.removeAllChildren();
equal(get(view, 'childViews.length'), 0, 'removed all children');
});
-test("returns receiver", function() {
+QUnit.test("returns receiver", function() {
equal(view.removeAllChildren(), view, 'receiver');
});
@@ -86,7 +86,7 @@ QUnit.module("View#removeFromParent", {
}
});
-test("removes view from parent view", function() {
+QUnit.test("removes view from parent view", function() {
expectDeprecation("Setting `childViews` on a Container is deprecated.");
parentView = ContainerView.create({ childViews: [View] });
@@ -108,7 +108,7 @@ test("removes view from parent view", function() {
equal(parentView.$('div').length, 0, "removes DOM element from parent");
});
-test("returns receiver", function() {
+QUnit.test("returns receiver", function() {
expectDeprecation("Setting `childViews` on a Container is deprecated.");
parentView = ContainerView.create({ childViews: [View] });
@@ -120,7 +120,7 @@ test("returns receiver", function() {
equal(removed, child, 'receiver');
});
-test("does nothing if not in parentView", function() {
+QUnit.test("does nothing if not in parentView", function() {
child = View.create();
// monkey patch for testing...
@@ -134,7 +134,7 @@ test("does nothing if not in parentView", function() {
});
-test("the DOM element is gone after doing append and remove in two separate runloops", function() {
+QUnit.test("the DOM element is gone after doing append and remove in two separate runloops", function() {
view = View.create();
run(function() {
view.append();
@@ -147,7 +147,7 @@ test("the DOM element is gone after doing append and remove in two separate runl
ok(viewElem.length === 0, "view's element doesn't exist in DOM");
});
-test("the DOM element is gone after doing append and remove in a single runloop", function() {
+QUnit.test("the DOM element is gone after doing append and remove in a single runloop", function() {
view = View.create();
run(function() {
view.append();
diff --git a/packages/ember-views/tests/views/view/render_test.js b/packages/ember-views/tests/views/view/render_test.js
index 3e00611c0ee..6e8c9df6b21 100644
--- a/packages/ember-views/tests/views/view/render_test.js
+++ b/packages/ember-views/tests/views/view/render_test.js
@@ -20,7 +20,7 @@ QUnit.module("EmberView#render", {
}
});
-test("default implementation does not render child views", function() {
+QUnit.test("default implementation does not render child views", function() {
expectDeprecation("Setting `childViews` on a Container is deprecated.");
var rendered = 0;
@@ -51,7 +51,7 @@ test("default implementation does not render child views", function() {
});
-test("should invoke renderChildViews if layer is destroyed then re-rendered", function() {
+QUnit.test("should invoke renderChildViews if layer is destroyed then re-rendered", function() {
expectDeprecation("Setting `childViews` on a Container is deprecated.");
var rendered = 0;
@@ -94,7 +94,7 @@ test("should invoke renderChildViews if layer is destroyed then re-rendered", fu
});
});
-test("should render child views with a different tagName", function() {
+QUnit.test("should render child views with a different tagName", function() {
expectDeprecation("Setting `childViews` on a Container is deprecated.");
view = ContainerView.create({
@@ -112,7 +112,7 @@ test("should render child views with a different tagName", function() {
equal(view.$('aside').length, 1);
});
-test("should add ember-view to views", function() {
+QUnit.test("should add ember-view to views", function() {
view = EmberView.create();
run(function() {
@@ -122,7 +122,7 @@ test("should add ember-view to views", function() {
ok(view.$().hasClass('ember-view'), "the view has ember-view");
});
-test("should allow tagName to be a computed property [DEPRECATED]", function() {
+QUnit.test("should allow tagName to be a computed property [DEPRECATED]", function() {
view = EmberView.extend({
tagName: computed(function() {
return 'span';
@@ -144,7 +144,7 @@ test("should allow tagName to be a computed property [DEPRECATED]", function() {
equal(view.element.tagName, 'SPAN', "the tagName cannot be changed after initial render");
});
-test("should allow hX tags as tagName", function() {
+QUnit.test("should allow hX tags as tagName", function() {
expectDeprecation("Setting `childViews` on a Container is deprecated.");
view = ContainerView.create({
@@ -162,7 +162,7 @@ test("should allow hX tags as tagName", function() {
ok(view.$('h3').length, "does not render the h3 tag correctly");
});
-test("should not add role attribute unless one is specified", function() {
+QUnit.test("should not add role attribute unless one is specified", function() {
view = EmberView.create();
run(function() {
@@ -172,7 +172,7 @@ test("should not add role attribute unless one is specified", function() {
ok(view.$().attr('role') === undefined, "does not have a role attribute");
});
-test("should re-render if the context is changed", function() {
+QUnit.test("should re-render if the context is changed", function() {
view = EmberView.create({
elementId: 'template-context-test',
context: { foo: "bar" },
@@ -197,7 +197,7 @@ test("should re-render if the context is changed", function() {
equal(jQuery('#qunit-fixture #template-context-test').text(), "bang baz", "re-renders the view with the updated context");
});
-test("renders contained view with omitted start tag and parent view context", function() {
+QUnit.test("renders contained view with omitted start tag and parent view context", function() {
expectDeprecation("Setting `childViews` on a Container is deprecated.");
view = ContainerView.createWithMixins({
@@ -219,7 +219,7 @@ test("renders contained view with omitted start tag and parent view context", fu
equal(view.element.childNodes[0].tagName, 'TR', 'inner view is tr');
});
-test("renders a contained view with omitted start tag and tagless parent view context", function() {
+QUnit.test("renders a contained view with omitted start tag and tagless parent view context", function() {
view = EmberView.createWithMixins({
tagName: 'table',
template: compile("{{view view.pivot}}"),
diff --git a/packages/ember-views/tests/views/view/replace_in_test.js b/packages/ember-views/tests/views/view/replace_in_test.js
index 82c7de56fb2..a6146825a12 100644
--- a/packages/ember-views/tests/views/view/replace_in_test.js
+++ b/packages/ember-views/tests/views/view/replace_in_test.js
@@ -18,7 +18,7 @@ QUnit.module("EmberView - replaceIn()", {
}
});
-test("should be added to the specified element when calling replaceIn()", function() {
+QUnit.test("should be added to the specified element when calling replaceIn()", function() {
jQuery("#qunit-fixture").html('');
view = View.create();
@@ -33,7 +33,7 @@ test("should be added to the specified element when calling replaceIn()", functi
ok(viewElem.length > 0, "creates and replaces the view's element");
});
-test("raises an assert when a target does not exist in the DOM", function() {
+QUnit.test("raises an assert when a target does not exist in the DOM", function() {
view = View.create();
expectAssertion(function() {
@@ -44,7 +44,7 @@ test("raises an assert when a target does not exist in the DOM", function() {
});
-test("should remove previous elements when calling replaceIn()", function() {
+QUnit.test("should remove previous elements when calling replaceIn()", function() {
jQuery("#qunit-fixture").html('');
var viewElem = jQuery('#menu').children();
@@ -60,7 +60,7 @@ test("should remove previous elements when calling replaceIn()", function() {
});
-test("should move the view to the inDOM state after replacing", function() {
+QUnit.test("should move the view to the inDOM state after replacing", function() {
jQuery("#qunit-fixture").html('');
view = View.create();
@@ -90,7 +90,7 @@ QUnit.module("EmberView - replaceIn() in a view hierarchy", {
}
});
-test("should be added to the specified element when calling replaceIn()", function() {
+QUnit.test("should be added to the specified element when calling replaceIn()", function() {
jQuery("#qunit-fixture").html('');
view = View.create();
diff --git a/packages/ember-views/tests/views/view/state_deprecation_test.js b/packages/ember-views/tests/views/view/state_deprecation_test.js
index 5e1708d03f3..2ad067719a6 100644
--- a/packages/ember-views/tests/views/view/state_deprecation_test.js
+++ b/packages/ember-views/tests/views/view/state_deprecation_test.js
@@ -13,7 +13,7 @@ QUnit.module("views/view/state_deprecation", {
});
if (hasPropertyAccessors) {
- test("view.state should be an alias of view._state with a deprecation", function() {
+ QUnit.test("view.state should be an alias of view._state with a deprecation", function() {
expect(2);
view = EmberView.create();
@@ -22,7 +22,7 @@ if (hasPropertyAccessors) {
}, 'Usage of `state` is deprecated, use `_state` instead.');
});
- test("view.states should be an alias of view._states with a deprecation", function() {
+ QUnit.test("view.states should be an alias of view._states with a deprecation", function() {
expect(2);
view = EmberView.create();
@@ -32,7 +32,7 @@ if (hasPropertyAccessors) {
});
}
-test("no deprecation is printed if view.state or view._state is not looked up", function() {
+QUnit.test("no deprecation is printed if view.state or view._state is not looked up", function() {
expect(2);
expectNoDeprecation();
diff --git a/packages/ember-views/tests/views/view/stream_test.js b/packages/ember-views/tests/views/view/stream_test.js
index 4d48ba66593..d1f36f54ca2 100644
--- a/packages/ember-views/tests/views/view/stream_test.js
+++ b/packages/ember-views/tests/views/view/stream_test.js
@@ -11,7 +11,7 @@ QUnit.module("ember-views: streams", {
}
});
-test("can return a stream that is notified of changes", function() {
+QUnit.test("can return a stream that is notified of changes", function() {
expect(2);
view = EmberView.create({
@@ -31,7 +31,7 @@ test("can return a stream that is notified of changes", function() {
run(view, 'set', 'controller.name', 'Max');
});
-test("a single stream is used for the same path", function() {
+QUnit.test("a single stream is used for the same path", function() {
expect(2);
var stream1, stream2;
@@ -53,7 +53,7 @@ test("a single stream is used for the same path", function() {
equal(stream1, stream2, 'streams "" and "this" should be the same object');
});
-test("the stream returned is labeled with the requested path", function() {
+QUnit.test("the stream returned is labeled with the requested path", function() {
expect(2);
var stream;
diff --git a/packages/ember-views/tests/views/view/template_test.js b/packages/ember-views/tests/views/view/template_test.js
index abab576d951..f140cb02012 100644
--- a/packages/ember-views/tests/views/view/template_test.js
+++ b/packages/ember-views/tests/views/view/template_test.js
@@ -21,7 +21,7 @@ QUnit.module("EmberView - Template Functionality", {
}
});
-test("Template views return throw if their template cannot be found", function() {
+QUnit.test("Template views return throw if their template cannot be found", function() {
view = EmberView.create({
templateName: 'cantBeFound',
container: { lookup: function() { } }
@@ -33,7 +33,7 @@ test("Template views return throw if their template cannot be found", function()
});
if (typeof Handlebars === "object") {
- test("should allow standard Handlebars template usage", function() {
+ QUnit.test("should allow standard Handlebars template usage", function() {
view = EmberView.create({
context: { name: "Erik" },
template: Handlebars.compile("Hello, {{name}}")
@@ -47,7 +47,7 @@ if (typeof Handlebars === "object") {
});
}
-test("should call the function of the associated template", function() {
+QUnit.test("should call the function of the associated template", function() {
registry.register('template:testTemplate', function() {
return "
template was called
";
});
@@ -64,7 +64,7 @@ test("should call the function of the associated template", function() {
ok(view.$('#twas-called').length, "the named template was called");
});
-test("should call the function of the associated template with itself as the context", function() {
+QUnit.test("should call the function of the associated template with itself as the context", function() {
registry.register('template:testTemplate', function(dataSource) {
return "
template was called for " + get(dataSource, 'personName') + "
";
});
@@ -85,7 +85,7 @@ test("should call the function of the associated template with itself as the con
equal("template was called for Tom DAAAALE", view.$('#twas-called').text(), "the named template was called with the view as the data source");
});
-test("should fall back to defaultTemplate if neither template nor templateName are provided", function() {
+QUnit.test("should fall back to defaultTemplate if neither template nor templateName are provided", function() {
var View;
View = EmberView.extend({
@@ -105,7 +105,7 @@ test("should fall back to defaultTemplate if neither template nor templateName a
equal("template was called for Tom DAAAALE", view.$('#twas-called').text(), "the named template was called with the view as the data source");
});
-test("should not use defaultTemplate if template is provided", function() {
+QUnit.test("should not use defaultTemplate if template is provided", function() {
var View;
View = EmberView.extend({
@@ -121,7 +121,7 @@ test("should not use defaultTemplate if template is provided", function() {
equal("foo", view.$().text(), "default template was not printed");
});
-test("should not use defaultTemplate if template is provided", function() {
+QUnit.test("should not use defaultTemplate if template is provided", function() {
var View;
registry.register('template:foobar', function() { return 'foo'; });
@@ -140,7 +140,7 @@ test("should not use defaultTemplate if template is provided", function() {
equal("foo", view.$().text(), "default template was not printed");
});
-test("should render an empty element if no template is specified", function() {
+QUnit.test("should render an empty element if no template is specified", function() {
view = EmberView.create();
run(function() {
view.createElement();
@@ -149,7 +149,7 @@ test("should render an empty element if no template is specified", function() {
equal(view.$().html(), '', "view div should be empty");
});
-test("should provide a controller to the template if a controller is specified on the view", function() {
+QUnit.test("should provide a controller to the template if a controller is specified on the view", function() {
expect(7);
var Controller1 = EmberObject.extend({
@@ -240,7 +240,7 @@ test("should provide a controller to the template if a controller is specified o
});
});
-test("should throw an assertion if no container has been set", function() {
+QUnit.test("should throw an assertion if no container has been set", function() {
expect(1);
var View;
diff --git a/packages/ember-views/tests/views/view/transition_to_deprecation_test.js b/packages/ember-views/tests/views/view/transition_to_deprecation_test.js
index 5c95197b3ae..f398bf8d22f 100644
--- a/packages/ember-views/tests/views/view/transition_to_deprecation_test.js
+++ b/packages/ember-views/tests/views/view/transition_to_deprecation_test.js
@@ -12,7 +12,7 @@ QUnit.module('views/view/transition_to_deprecation', {
}
});
-test('deprecates when calling transitionTo', function() {
+QUnit.test('deprecates when calling transitionTo', function() {
expect(1);
view = EmberView.create();
@@ -22,7 +22,7 @@ test('deprecates when calling transitionTo', function() {
}, '');
});
-test("doesn't deprecate when calling _transitionTo", function() {
+QUnit.test("doesn't deprecate when calling _transitionTo", function() {
expect(1);
view = EmberView.create();
diff --git a/packages/ember-views/tests/views/view/view_lifecycle_test.js b/packages/ember-views/tests/views/view/view_lifecycle_test.js
index d980e97f1a3..ad005cc2ae0 100644
--- a/packages/ember-views/tests/views/view/view_lifecycle_test.js
+++ b/packages/ember-views/tests/views/view/view_lifecycle_test.js
@@ -28,7 +28,7 @@ function tmpl(str) {
};
}
-test("should create and append a DOM element after bindings have synced", function() {
+QUnit.test("should create and append a DOM element after bindings have synced", function() {
var ViewTest;
lookup.ViewTest = ViewTest = {};
@@ -54,7 +54,7 @@ test("should create and append a DOM element after bindings have synced", functi
equal(view.$().text(), 'controllerPropertyValue', "renders and appends after bindings have synced");
});
-test("should throw an exception if trying to append a child before rendering has begun", function() {
+QUnit.test("should throw an exception if trying to append a child before rendering has begun", function() {
run(function() {
view = EmberView.create();
});
@@ -64,7 +64,7 @@ test("should throw an exception if trying to append a child before rendering has
}, null, "throws an error when calling appendChild()");
});
-test("should not affect rendering if rerender is called before initial render happens", function() {
+QUnit.test("should not affect rendering if rerender is called before initial render happens", function() {
run(function() {
view = EmberView.create({
template: tmpl("Rerender me!")
@@ -77,7 +77,7 @@ test("should not affect rendering if rerender is called before initial render ha
equal(view.$().text(), "Rerender me!", "renders correctly if rerender is called first");
});
-test("should not affect rendering if destroyElement is called before initial render happens", function() {
+QUnit.test("should not affect rendering if destroyElement is called before initial render happens", function() {
run(function() {
view = EmberView.create({
template: tmpl("Don't destroy me!")
@@ -104,7 +104,7 @@ QUnit.module("views/view/view_lifecycle_test - in render", {
}
});
-test("appendChild should work inside a template", function() {
+QUnit.test("appendChild should work inside a template", function() {
run(function() {
view = EmberView.create({
template: function(context, options) {
@@ -127,7 +127,7 @@ test("appendChild should work inside a template", function() {
"The appended child is visible");
});
-test("rerender should throw inside a template", function() {
+QUnit.test("rerender should throw inside a template", function() {
throws(function() {
run(function() {
var renderCount = 0;
@@ -166,7 +166,7 @@ QUnit.module("views/view/view_lifecycle_test - hasElement", {
}
});
-test("createElement puts the view into the hasElement state", function() {
+QUnit.test("createElement puts the view into the hasElement state", function() {
view = EmberView.create({
render: function(buffer) { buffer.push('hello'); }
});
@@ -178,7 +178,7 @@ test("createElement puts the view into the hasElement state", function() {
equal(view.currentState, view._states.hasElement, "the view is in the hasElement state");
});
-test("trigger rerender on a view in the hasElement state doesn't change its state to inDOM", function() {
+QUnit.test("trigger rerender on a view in the hasElement state doesn't change its state to inDOM", function() {
view = EmberView.create({
render: function(buffer) { buffer.push('hello'); }
});
@@ -202,7 +202,7 @@ QUnit.module("views/view/view_lifecycle_test - in DOM", {
}
});
-test("should throw an exception when calling appendChild when DOM element exists", function() {
+QUnit.test("should throw an exception when calling appendChild when DOM element exists", function() {
run(function() {
view = EmberView.create({
template: tmpl("Wait for the kick")
@@ -218,7 +218,7 @@ test("should throw an exception when calling appendChild when DOM element exists
}, null, "throws an exception when calling appendChild after element is created");
});
-test("should replace DOM representation if rerender() is called after element is created", function() {
+QUnit.test("should replace DOM representation if rerender() is called after element is created", function() {
run(function() {
view = EmberView.create({
template: function(context, options) {
@@ -246,7 +246,7 @@ test("should replace DOM representation if rerender() is called after element is
equal(view.$().text(), "Do not taunt happy fun ball", "rerenders DOM element when rerender() is called");
});
-test("should destroy DOM representation when destroyElement is called", function() {
+QUnit.test("should destroy DOM representation when destroyElement is called", function() {
run(function() {
view = EmberView.create({
template: tmpl("Don't fear the reaper")
@@ -264,7 +264,7 @@ test("should destroy DOM representation when destroyElement is called", function
ok(!view.get('element'), "destroys view when destroyElement() is called");
});
-test("should destroy DOM representation when destroy is called", function() {
+QUnit.test("should destroy DOM representation when destroy is called", function() {
run(function() {
view = EmberView.create({
template: tmpl("
Don't fear the reaper
")
@@ -282,7 +282,7 @@ test("should destroy DOM representation when destroy is called", function() {
ok(jQuery('#warning').length === 0, "destroys element when destroy() is called");
});
-test("should throw an exception if trying to append an element that is already in DOM", function() {
+QUnit.test("should throw an exception if trying to append an element that is already in DOM", function() {
run(function() {
view = EmberView.create({
template: tmpl('Broseidon, King of the Brocean')
@@ -302,7 +302,7 @@ test("should throw an exception if trying to append an element that is already i
QUnit.module("views/view/view_lifecycle_test - destroyed");
-test("should throw an exception when calling appendChild after view is destroyed", function() {
+QUnit.test("should throw an exception when calling appendChild after view is destroyed", function() {
run(function() {
view = EmberView.create({
template: tmpl("Wait for the kick")
@@ -322,7 +322,7 @@ test("should throw an exception when calling appendChild after view is destroyed
}, null, "throws an exception when calling appendChild");
});
-test("should throw an exception when rerender is called after view is destroyed", function() {
+QUnit.test("should throw an exception when rerender is called after view is destroyed", function() {
run(function() {
view = EmberView.create({
template: tmpl('foo')
@@ -340,7 +340,7 @@ test("should throw an exception when rerender is called after view is destroyed"
}, null, "throws an exception when calling rerender");
});
-test("should throw an exception when destroyElement is called after view is destroyed", function() {
+QUnit.test("should throw an exception when destroyElement is called after view is destroyed", function() {
run(function() {
view = EmberView.create({
template: tmpl('foo')
@@ -358,7 +358,7 @@ test("should throw an exception when destroyElement is called after view is dest
}, null, "throws an exception when calling destroyElement");
});
-test("trigger rerender on a view in the inDOM state keeps its state as inDOM", function() {
+QUnit.test("trigger rerender on a view in the inDOM state keeps its state as inDOM", function() {
run(function() {
view = EmberView.create({
template: tmpl('foo')
diff --git a/packages/ember-views/tests/views/view/virtual_views_test.js b/packages/ember-views/tests/views/view/virtual_views_test.js
index fbc93e1f452..08b2a5f293a 100644
--- a/packages/ember-views/tests/views/view/virtual_views_test.js
+++ b/packages/ember-views/tests/views/view/virtual_views_test.js
@@ -14,7 +14,7 @@ QUnit.module("virtual views", {
}
});
-test("a virtual view does not appear as a view's parentView", function() {
+QUnit.test("a virtual view does not appear as a view's parentView", function() {
rootView = EmberView.create({
elementId: 'root-view',
@@ -54,7 +54,7 @@ test("a virtual view does not appear as a view's parentView", function() {
equal(children.objectAt(0), childView, "the child element skips through the virtual view");
});
-test("when a virtual view's child views change, the parent's childViews should reflect", function() {
+QUnit.test("when a virtual view's child views change, the parent's childViews should reflect", function() {
rootView = EmberView.create({
elementId: 'root-view',
diff --git a/packages/ember/tests/application_lifecycle.js b/packages/ember/tests/application_lifecycle.js
index 9ccd91c72e8..8cbfaaf5b05 100644
--- a/packages/ember/tests/application_lifecycle.js
+++ b/packages/ember/tests/application_lifecycle.js
@@ -39,7 +39,7 @@ function handleURL(path) {
}
-test("Resetting the application allows controller properties to be set when a route deactivates", function() {
+QUnit.test("Resetting the application allows controller properties to be set when a route deactivates", function() {
App.Router.map(function() {
this.route('home', { path: '/' });
});
@@ -76,7 +76,7 @@ test("Resetting the application allows controller properties to be set when a ro
equal(Ember.controllerFor(container, 'application').get('selectedMenuItem'), null);
});
-test("Destroying the application resets the router before the container is destroyed", function() {
+QUnit.test("Destroying the application resets the router before the container is destroyed", function() {
App.Router.map(function() {
this.route('home', { path: '/' });
});
diff --git a/packages/ember/tests/component_registration_test.js b/packages/ember/tests/component_registration_test.js
index 43687cc5e77..f54731df4d3 100644
--- a/packages/ember/tests/component_registration_test.js
+++ b/packages/ember/tests/component_registration_test.js
@@ -65,12 +65,12 @@ function boot(callback) {
});
}
-test("The helper becomes the body of the component", function() {
+QUnit.test("The helper becomes the body of the component", function() {
boot();
equal(Ember.$('div.ember-view > div.ember-view', '#qunit-fixture').text(), "hello world", "The component is composed correctly");
});
-test("If a component is registered, it is used", function() {
+QUnit.test("If a component is registered, it is used", function() {
boot(function() {
registry.register('component:expand-it', Ember.Component.extend({
classNames: 'testing123'
@@ -81,7 +81,7 @@ test("If a component is registered, it is used", function() {
});
-test("Late-registered components can be rendered with custom `template` property (DEPRECATED)", function() {
+QUnit.test("Late-registered components can be rendered with custom `template` property (DEPRECATED)", function() {
Ember.TEMPLATES.application = compile("
there goes {{my-hero}}
");
@@ -98,7 +98,7 @@ test("Late-registered components can be rendered with custom `template` property
ok(!helpers['my-hero'], "Component wasn't saved to global helpers hash");
});
-test("Late-registered components can be rendered with template registered on the container", function() {
+QUnit.test("Late-registered components can be rendered with template registered on the container", function() {
Ember.TEMPLATES.application = compile("
hello world {{sally-rutherford}}-{{#sally-rutherford}}!!!{{/sally-rutherford}}
");
@@ -111,7 +111,7 @@ test("Late-registered components can be rendered with template registered on the
ok(!helpers['sally-rutherford'], "Component wasn't saved to global helpers hash");
});
-test("Late-registered components can be rendered with ONLY the template registered on the container", function() {
+QUnit.test("Late-registered components can be rendered with ONLY the template registered on the container", function() {
Ember.TEMPLATES.application = compile("
hello world {{borf-snorlax}}-{{#borf-snorlax}}!!!{{/borf-snorlax}}
");
@@ -123,7 +123,7 @@ test("Late-registered components can be rendered with ONLY the template register
ok(!helpers['borf-snorlax'], "Component wasn't saved to global helpers hash");
});
-test("Component-like invocations are treated as bound paths if neither template nor component are registered on the container", function() {
+QUnit.test("Component-like invocations are treated as bound paths if neither template nor component are registered on the container", function() {
Ember.TEMPLATES.application = compile("
{{user-name}} hello {{api-key}} world
");
@@ -136,7 +136,7 @@ test("Component-like invocations are treated as bound paths if neither template
equal(Ember.$('#wrapper').text(), "machty hello world", "The component is composed correctly");
});
-test("Assigning templateName to a component should setup the template as a layout (DEPRECATED)", function() {
+QUnit.test("Assigning templateName to a component should setup the template as a layout (DEPRECATED)", function() {
expect(2);
Ember.TEMPLATES.application = compile("
{{#my-component}}{{text}}{{/my-component}}
");
@@ -158,7 +158,7 @@ test("Assigning templateName to a component should setup the template as a layou
equal(Ember.$('#wrapper').text(), "inner-outer", "The component is composed correctly");
});
-test("Assigning templateName and layoutName should use the templates specified", function() {
+QUnit.test("Assigning templateName and layoutName should use the templates specified", function() {
expect(1);
Ember.TEMPLATES.application = compile("
{{my-component}}
");
@@ -184,7 +184,7 @@ if (!Ember.FEATURES.isEnabled('ember-htmlbars')) {
// jscs:disable validateIndentation
// ember-htmlbars doesn't throw an exception when a helper is not found
-test('Using name of component that does not exist', function () {
+QUnit.test('Using name of component that does not exist', function () {
Ember.TEMPLATES.application = compile("
{{#no-good}} {{/no-good}}
");
throws(function () {
@@ -200,7 +200,7 @@ QUnit.module("Application Lifecycle - Component Context", {
teardown: cleanup
});
-test("Components with a block should have the proper content when a template is provided", function() {
+QUnit.test("Components with a block should have the proper content when a template is provided", function() {
Ember.TEMPLATES.application = compile("
{{#my-component}}{{text}}{{/my-component}}
");
Ember.TEMPLATES['components/my-component'] = compile("{{text}}-{{yield}}");
@@ -217,7 +217,7 @@ test("Components with a block should have the proper content when a template is
equal(Ember.$('#wrapper').text(), "inner-outer", "The component is composed correctly");
});
-test("Components with a block should yield the proper content without a template provided", function() {
+QUnit.test("Components with a block should yield the proper content without a template provided", function() {
Ember.TEMPLATES.application = compile("
{{#my-component}}{{text}}{{/my-component}}
");
boot(function() {
@@ -233,7 +233,7 @@ test("Components with a block should yield the proper content without a template
equal(Ember.$('#wrapper').text(), "outer", "The component is composed correctly");
});
-test("Components without a block should have the proper content when a template is provided", function() {
+QUnit.test("Components without a block should have the proper content when a template is provided", function() {
Ember.TEMPLATES.application = compile("
{{my-component}}
");
Ember.TEMPLATES['components/my-component'] = compile("{{text}}");
@@ -250,7 +250,7 @@ test("Components without a block should have the proper content when a template
equal(Ember.$('#wrapper').text(), "inner", "The component is composed correctly");
});
-test("Components without a block should have the proper content", function() {
+QUnit.test("Components without a block should have the proper content", function() {
Ember.TEMPLATES.application = compile("
{{my-component}}
");
boot(function() {
@@ -268,7 +268,7 @@ test("Components without a block should have the proper content", function() {
equal(Ember.$('#wrapper').text(), "Some text inserted by jQuery", "The component is composed correctly");
});
-test("properties of a component without a template should not collide with internal structures", function() {
+QUnit.test("properties of a component without a template should not collide with internal structures", function() {
Ember.TEMPLATES.application = compile("
{{my-component data=foo}}
");
boot(function() {
@@ -287,7 +287,7 @@ test("properties of a component without a template should not collide with inte
equal(Ember.$('#wrapper').text(), "Some text inserted by jQuery", "The component is composed correctly");
});
-test("Components trigger actions in the parents context when called from within a block", function() {
+QUnit.test("Components trigger actions in the parents context when called from within a block", function() {
Ember.TEMPLATES.application = compile("
{{#my-component}}
Fizzbuzz{{/my-component}}
");
boot(function() {
@@ -307,7 +307,7 @@ test("Components trigger actions in the parents context when called from within
});
});
-test("Components trigger actions in the components context when called from within its template", function() {
+QUnit.test("Components trigger actions in the components context when called from within its template", function() {
Ember.TEMPLATES.application = compile("
{{#my-component}}{{text}}{{/my-component}}
");
Ember.TEMPLATES['components/my-component'] = compile("
Fizzbuzz");
diff --git a/packages/ember/tests/global-api-test.js b/packages/ember/tests/global-api-test.js
index 54945988602..a8f94bccee4 100644
--- a/packages/ember/tests/global-api-test.js
+++ b/packages/ember/tests/global-api-test.js
@@ -3,7 +3,7 @@ import "ember";
QUnit.module("Global API Tests");
function confirmExport(property) {
- test('confirm ' + property + ' is exported', function() {
+ QUnit.test('confirm ' + property + ' is exported', function() {
ok(Ember.get(window, property) + ' is exported propertly');
});
}
diff --git a/packages/ember/tests/helpers/helper_registration_test.js b/packages/ember/tests/helpers/helper_registration_test.js
index e4ec3873f77..f6fcea80d78 100644
--- a/packages/ember/tests/helpers/helper_registration_test.js
+++ b/packages/ember/tests/helpers/helper_registration_test.js
@@ -51,7 +51,7 @@ var boot = function(callback) {
});
};
-test("Unbound dashed helpers registered on the container can be late-invoked", function() {
+QUnit.test("Unbound dashed helpers registered on the container can be late-invoked", function() {
Ember.TEMPLATES.application = compile("
{{x-borf}} {{x-borf YES}}
");
@@ -66,7 +66,7 @@ test("Unbound dashed helpers registered on the container can be late-invoked", f
});
// need to make `makeBoundHelper` for HTMLBars
-test("Bound helpers registered on the container can be late-invoked", function() {
+QUnit.test("Bound helpers registered on the container can be late-invoked", function() {
Ember.TEMPLATES.application = compile("
{{x-reverse}} {{x-reverse foo}}
");
boot(function() {
@@ -85,7 +85,7 @@ if (!Ember.FEATURES.isEnabled('ember-htmlbars')) {
// we have unit tests for this in ember-htmlbars/tests/system/lookup-helper
// and we are not going to recreate the handlebars helperMissing concept
-test("Undashed helpers registered on the container can not (presently) be invoked", function() {
+QUnit.test("Undashed helpers registered on the container can not (presently) be invoked", function() {
var realHelperMissing = helpers.helperMissing;
helpers.helperMissing = function() {
diff --git a/packages/ember/tests/helpers/link_to_test.js b/packages/ember/tests/helpers/link_to_test.js
index b75a6dc8fed..d484ec92fbe 100644
--- a/packages/ember/tests/helpers/link_to_test.js
+++ b/packages/ember/tests/helpers/link_to_test.js
@@ -91,7 +91,7 @@ QUnit.module("The {{link-to}} helper", {
teardown: sharedTeardown
});
-test("The {{link-to}} helper moves into the named route", function() {
+QUnit.test("The {{link-to}} helper moves into the named route", function() {
Router.map(function(match) {
this.route("about");
});
@@ -115,7 +115,7 @@ test("The {{link-to}} helper moves into the named route", function() {
equal(Ember.$('#home-link:not(.active)', '#qunit-fixture').length, 1, "The other link was rendered without active class");
});
-test("The {{link-to}} helper supports URL replacement", function() {
+QUnit.test("The {{link-to}} helper supports URL replacement", function() {
Ember.TEMPLATES.index = compile("
Home
{{#link-to 'about' id='about-link' replace=true}}About{{/link-to}}");
@@ -140,7 +140,7 @@ test("The {{link-to}} helper supports URL replacement", function() {
equal(replaceCount, 1, 'replaceURL should be called once');
});
-test("the {{link-to}} helper doesn't add an href when the tagName isn't 'a'", function() {
+QUnit.test("the {{link-to}} helper doesn't add an href when the tagName isn't 'a'", function() {
Ember.TEMPLATES.index = compile("{{#link-to 'about' id='about-link' tagName='div'}}About{{/link-to}}");
Router.map(function() {
@@ -157,7 +157,7 @@ test("the {{link-to}} helper doesn't add an href when the tagName isn't 'a'", fu
});
-test("the {{link-to}} applies a 'disabled' class when disabled", function () {
+QUnit.test("the {{link-to}} applies a 'disabled' class when disabled", function () {
Ember.TEMPLATES.index = compile('{{#link-to "about" id="about-link" disabledWhen="shouldDisable"}}About{{/link-to}}');
App.IndexController = Ember.Controller.extend({
shouldDisable: true
@@ -176,7 +176,7 @@ test("the {{link-to}} applies a 'disabled' class when disabled", function () {
equal(Ember.$('#about-link.disabled', '#qunit-fixture').length, 1, "The link is disabled when its disabledWhen is true");
});
-test("the {{link-to}} doesn't apply a 'disabled' class if disabledWhen is not provided", function () {
+QUnit.test("the {{link-to}} doesn't apply a 'disabled' class if disabledWhen is not provided", function () {
Ember.TEMPLATES.index = compile('{{#link-to "about" id="about-link"}}About{{/link-to}}');
Router.map(function() {
@@ -192,7 +192,7 @@ test("the {{link-to}} doesn't apply a 'disabled' class if disabledWhen is not pr
ok(!Ember.$('#about-link', '#qunit-fixture').hasClass("disabled"), "The link is not disabled if disabledWhen not provided");
});
-test("the {{link-to}} helper supports a custom disabledClass", function () {
+QUnit.test("the {{link-to}} helper supports a custom disabledClass", function () {
Ember.TEMPLATES.index = compile('{{#link-to "about" id="about-link" disabledWhen="shouldDisable" disabledClass="do-not-want"}}About{{/link-to}}');
App.IndexController = Ember.Controller.extend({
shouldDisable: true
@@ -212,7 +212,7 @@ test("the {{link-to}} helper supports a custom disabledClass", function () {
});
-test("the {{link-to}} helper does not respond to clicks when disabled", function () {
+QUnit.test("the {{link-to}} helper does not respond to clicks when disabled", function () {
Ember.TEMPLATES.index = compile('{{#link-to "about" id="about-link" disabledWhen="shouldDisable"}}About{{/link-to}}');
App.IndexController = Ember.Controller.extend({
shouldDisable: true
@@ -235,7 +235,7 @@ test("the {{link-to}} helper does not respond to clicks when disabled", function
equal(Ember.$('h3:contains(About)', '#qunit-fixture').length, 0, "Transitioning did not occur");
});
-test("The {{link-to}} helper supports a custom activeClass", function() {
+QUnit.test("The {{link-to}} helper supports a custom activeClass", function() {
Ember.TEMPLATES.index = compile("
Home
{{#link-to 'about' id='about-link'}}About{{/link-to}}{{#link-to 'index' id='self-link' activeClass='zomg-active'}}Self{{/link-to}}");
Router.map(function() {
@@ -253,7 +253,7 @@ test("The {{link-to}} helper supports a custom activeClass", function() {
equal(Ember.$('#about-link:not(.active)', '#qunit-fixture').length, 1, "The other link was rendered without active class");
});
-test("The {{link-to}} helper supports leaving off .index for nested routes", function() {
+QUnit.test("The {{link-to}} helper supports leaving off .index for nested routes", function() {
Router.map(function() {
this.resource("about", function() {
this.route("item");
@@ -271,7 +271,7 @@ test("The {{link-to}} helper supports leaving off .index for nested routes", fun
equal(normalizeUrl(Ember.$('#item a', '#qunit-fixture').attr('href')), '/about');
});
-test("The {{link-to}} helper supports currentWhen (DEPRECATED)", function() {
+QUnit.test("The {{link-to}} helper supports currentWhen (DEPRECATED)", function() {
expectDeprecation('Using currentWhen with {{link-to}} is deprecated in favor of `current-when`.');
Router.map(function(match) {
@@ -294,7 +294,7 @@ test("The {{link-to}} helper supports currentWhen (DEPRECATED)", function() {
equal(Ember.$('#other-link.active', '#qunit-fixture').length, 1, "The link is active since current-when is a parent route");
});
-test("The {{link-to}} helper supports custom, nested, current-when", function() {
+QUnit.test("The {{link-to}} helper supports custom, nested, current-when", function() {
Router.map(function(match) {
this.resource("index", { path: "/" }, function() {
this.route("about");
@@ -315,7 +315,7 @@ test("The {{link-to}} helper supports custom, nested, current-when", function()
equal(Ember.$('#other-link.active', '#qunit-fixture').length, 1, "The link is active since current-when is a parent route");
});
-test("The {{link-to}} helper does not disregard current-when when it is given explicitly for a resource", function() {
+QUnit.test("The {{link-to}} helper does not disregard current-when when it is given explicitly for a resource", function() {
Router.map(function(match) {
this.resource("index", { path: "/" }, function() {
this.route("about");
@@ -338,7 +338,7 @@ test("The {{link-to}} helper does not disregard current-when when it is given ex
equal(Ember.$('#other-link.active', '#qunit-fixture').length, 1, "The link is active when current-when is given for explicitly for a resource");
});
-test("The {{link-to}} helper supports multiple current-when routes", function() {
+QUnit.test("The {{link-to}} helper supports multiple current-when routes", function() {
Router.map(function(match) {
this.resource("index", { path: "/" }, function() {
this.route("about");
@@ -373,7 +373,7 @@ test("The {{link-to}} helper supports multiple current-when routes", function()
equal(Ember.$('#link3.active', '#qunit-fixture').length, 0, "The link is not active since current-when does not contain the active route");
});
-test("The {{link-to}} helper defaults to bubbling", function() {
+QUnit.test("The {{link-to}} helper defaults to bubbling", function() {
Ember.TEMPLATES.about = compile("
{{#link-to 'about.contact' id='about-contact'}}About{{/link-to}}
{{outlet}}");
Ember.TEMPLATES['about/contact'] = compile("
");
@@ -408,7 +408,7 @@ test("The {{link-to}} helper defaults to bubbling", function() {
equal(hidden, 1, "The link bubbles");
});
-test("The {{link-to}} helper supports bubbles=false", function() {
+QUnit.test("The {{link-to}} helper supports bubbles=false", function() {
Ember.TEMPLATES.about = compile("
{{#link-to 'about.contact' id='about-contact' bubbles=false}}About{{/link-to}}
{{outlet}}");
Ember.TEMPLATES['about/contact'] = compile("
");
@@ -443,7 +443,7 @@ test("The {{link-to}} helper supports bubbles=false", function() {
equal(hidden, 0, "The link didn't bubble");
});
-test("The {{link-to}} helper moves into the named route with context", function() {
+QUnit.test("The {{link-to}} helper moves into the named route with context", function() {
Router.map(function(match) {
this.route("about");
this.resource("item", { path: "/item/:id" });
@@ -498,7 +498,7 @@ test("The {{link-to}} helper moves into the named route with context", function(
equal(Ember.$('p', '#qunit-fixture').text(), "Erik Brynroflsson", "The name is correct");
});
-test("The {{link-to}} helper binds some anchor html tag common attributes", function() {
+QUnit.test("The {{link-to}} helper binds some anchor html tag common attributes", function() {
Ember.TEMPLATES.index = compile("
Home
{{#link-to 'index' id='self-link' title='title-attr' rel='rel-attr' tabindex='-1'}}Self{{/link-to}}");
bootApplication();
@@ -512,7 +512,7 @@ test("The {{link-to}} helper binds some anchor html tag common attributes", func
equal(link.attr('tabindex'), '-1', "The self-link contains tabindex attribute");
});
-test("The {{link-to}} helper supports `target` attribute", function() {
+QUnit.test("The {{link-to}} helper supports `target` attribute", function() {
Ember.TEMPLATES.index = compile("
Home
{{#link-to 'index' id='self-link' target='_blank'}}Self{{/link-to}}");
bootApplication();
@@ -524,7 +524,7 @@ test("The {{link-to}} helper supports `target` attribute", function() {
equal(link.attr('target'), '_blank', "The self-link contains `target` attribute");
});
-test("The {{link-to}} helper does not call preventDefault if `target` attribute is provided", function() {
+QUnit.test("The {{link-to}} helper does not call preventDefault if `target` attribute is provided", function() {
Ember.TEMPLATES.index = compile("
Home
{{#link-to 'index' id='self-link' target='_blank'}}Self{{/link-to}}");
bootApplication();
@@ -538,7 +538,7 @@ test("The {{link-to}} helper does not call preventDefault if `target` attribute
equal(event.isDefaultPrevented(), false, "should not preventDefault when target attribute is specified");
});
-test("The {{link-to}} helper should preventDefault when `target = _self`", function() {
+QUnit.test("The {{link-to}} helper should preventDefault when `target = _self`", function() {
Ember.TEMPLATES.index = compile("
Home
{{#link-to 'index' id='self-link' target='_self'}}Self{{/link-to}}");
bootApplication();
@@ -552,7 +552,7 @@ test("The {{link-to}} helper should preventDefault when `target = _self`", funct
equal(event.isDefaultPrevented(), true, "should preventDefault when target attribute is `_self`");
});
-test("The {{link-to}} helper should not transition if target is not equal to _self or empty", function() {
+QUnit.test("The {{link-to}} helper should not transition if target is not equal to _self or empty", function() {
Ember.TEMPLATES.index = compile("{{#link-to 'about' id='about-link' replace=true target='_blank'}}About{{/link-to}}");
Router.map(function() {
@@ -572,7 +572,7 @@ test("The {{link-to}} helper should not transition if target is not equal to _se
notEqual(container.lookup('controller:application').get('currentRouteName'), 'about', 'link-to should not transition if target is not equal to _self or empty');
});
-test("The {{link-to}} helper accepts string/numeric arguments", function() {
+QUnit.test("The {{link-to}} helper accepts string/numeric arguments", function() {
Router.map(function() {
this.route('filter', { path: '/filters/:filter' });
this.route('post', { path: '/post/:post_id' });
@@ -599,7 +599,7 @@ test("The {{link-to}} helper accepts string/numeric arguments", function() {
equal(normalizeUrl(Ember.$('#repo-object-link', '#qunit-fixture').attr('href')), "/repo/ember/ember.js");
});
-test("Issue 4201 - Shorthand for route.index shouldn't throw errors about context arguments", function() {
+QUnit.test("Issue 4201 - Shorthand for route.index shouldn't throw errors about context arguments", function() {
expect(2);
Router.map(function() {
this.resource('lobby', function() {
@@ -625,7 +625,7 @@ test("Issue 4201 - Shorthand for route.index shouldn't throw errors about contex
});
-test("The {{link-to}} helper unwraps controllers", function() {
+QUnit.test("The {{link-to}} helper unwraps controllers", function() {
if (Ember.FEATURES.isEnabled('ember-routing-transitioning-classes')) {
expect(4);
@@ -666,7 +666,7 @@ test("The {{link-to}} helper unwraps controllers", function() {
Ember.$('#link', '#qunit-fixture').trigger('click');
});
-test("The {{link-to}} helper doesn't change view context", function() {
+QUnit.test("The {{link-to}} helper doesn't change view context", function() {
App.IndexView = Ember.View.extend({
elementId: 'index',
name: 'test',
@@ -684,7 +684,7 @@ test("The {{link-to}} helper doesn't change view context", function() {
equal(Ember.$('#index', '#qunit-fixture').text(), 'test-Link: test-test', "accesses correct view");
});
-test("Quoteless route param performs property lookup", function() {
+QUnit.test("Quoteless route param performs property lookup", function() {
Ember.TEMPLATES.index = compile("{{#link-to 'index' id='string-link'}}string{{/link-to}}{{#link-to foo id='path-link'}}path{{/link-to}}{{#link-to view.foo id='view-link'}}{{view.foo}}{{/link-to}}");
function assertEquality(href) {
@@ -722,7 +722,7 @@ test("Quoteless route param performs property lookup", function() {
assertEquality('/about');
});
-test("link-to with null/undefined dynamic parameters are put in a loading state", function() {
+QUnit.test("link-to with null/undefined dynamic parameters are put in a loading state", function() {
expect(19);
@@ -811,7 +811,7 @@ test("link-to with null/undefined dynamic parameters are put in a loading state"
Ember.Logger.warn = oldWarn;
});
-test("The {{link-to}} helper refreshes href element when one of params changes", function() {
+QUnit.test("The {{link-to}} helper refreshes href element when one of params changes", function() {
Router.map(function() {
this.route('post', { path: '/posts/:post_id' });
});
@@ -841,7 +841,7 @@ test("The {{link-to}} helper refreshes href element when one of params changes",
equal(Ember.$('#post', '#qunit-fixture').attr('href'), '#', 'href attr becomes # when one of the arguments in nullified');
});
-test("The {{link-to}} helper's bound parameter functionality works as expected in conjunction with an ObjectProxy/Controller", function() {
+QUnit.test("The {{link-to}} helper's bound parameter functionality works as expected in conjunction with an ObjectProxy/Controller", function() {
expectDeprecation(objectControllerDeprecation);
Router.map(function() {
@@ -871,7 +871,7 @@ test("The {{link-to}} helper's bound parameter functionality works as expected i
equal(normalizeUrl($link.attr('href')), '/posts/2', 'self link updated to post 2');
});
-test("{{linkTo}} is aliased", function() {
+QUnit.test("{{linkTo}} is aliased", function() {
Ember.TEMPLATES.index = compile("
Home
{{#linkTo 'about' id='about-link' replace=true}}About{{/linkTo}}");
Router.map(function() {
@@ -893,7 +893,7 @@ test("{{linkTo}} is aliased", function() {
equal(container.lookup('controller:application').get('currentRouteName'), 'about', 'linkTo worked properly');
});
-test("The {{link-to}} helper is active when a resource is active", function() {
+QUnit.test("The {{link-to}} helper is active when a resource is active", function() {
Router.map(function() {
this.resource("about", function() {
this.route("item");
@@ -918,7 +918,7 @@ test("The {{link-to}} helper is active when a resource is active", function() {
});
-test("The {{link-to}} helper works in an #each'd array of string route names", function() {
+QUnit.test("The {{link-to}} helper works in an #each'd array of string route names", function() {
Router.map(function() {
this.route('foo');
this.route('bar');
@@ -962,7 +962,7 @@ test("The {{link-to}} helper works in an #each'd array of string route names", f
linksEqual(Ember.$('a', '#qunit-fixture'), ["/bar", "/rar", "/bar", "/rar", "/rar", "/foo"]);
});
-test("The non-block form {{link-to}} helper moves into the named route", function() {
+QUnit.test("The non-block form {{link-to}} helper moves into the named route", function() {
expect(3);
Router.map(function(match) {
this.route("contact");
@@ -982,7 +982,7 @@ test("The non-block form {{link-to}} helper moves into the named route", functio
equal(Ember.$('#home-link:not(.active)', '#qunit-fixture').length, 1, "The other link was rendered without active class");
});
-test("The non-block form {{link-to}} helper updates the link text when it is a binding", function() {
+QUnit.test("The non-block form {{link-to}} helper updates the link text when it is a binding", function() {
expect(8);
Router.map(function(match) {
this.route("contact");
@@ -1030,7 +1030,7 @@ test("The non-block form {{link-to}} helper updates the link text when it is a b
equal(Ember.$('#contact-link:contains(Robert)', '#qunit-fixture').length, 1, "The link title is correctly updated when the route changes");
});
-test("The non-block form {{link-to}} helper moves into the named route with context", function() {
+QUnit.test("The non-block form {{link-to}} helper moves into the named route with context", function() {
expect(5);
Router.map(function(match) {
this.route("item", { path: "/item/:id" });
@@ -1072,7 +1072,7 @@ test("The non-block form {{link-to}} helper moves into the named route with cont
});
-test("The non-block form {{link-to}} performs property lookup", function() {
+QUnit.test("The non-block form {{link-to}} performs property lookup", function() {
Ember.TEMPLATES.index = compile("{{link-to 'string' 'index' id='string-link'}}{{link-to path foo id='path-link'}}{{link-to view.foo view.foo id='view-link'}}");
function assertEquality(href) {
@@ -1110,7 +1110,7 @@ test("The non-block form {{link-to}} performs property lookup", function() {
assertEquality('/about');
});
-test("The non-block form {{link-to}} protects against XSS", function() {
+QUnit.test("The non-block form {{link-to}} protects against XSS", function() {
Ember.TEMPLATES.application = compile("{{link-to display 'index' id='link'}}");
App.ApplicationController = Ember.Controller.extend({
@@ -1132,7 +1132,7 @@ test("The non-block form {{link-to}} protects against XSS", function() {
equal(Ember.$('b', '#qunit-fixture').length, 0);
});
-test("the {{link-to}} helper calls preventDefault", function() {
+QUnit.test("the {{link-to}} helper calls preventDefault", function() {
Router.map(function() {
this.route("about");
});
@@ -1147,7 +1147,7 @@ test("the {{link-to}} helper calls preventDefault", function() {
equal(event.isDefaultPrevented(), true, "should preventDefault");
});
-test("the {{link-to}} helper does not call preventDefault if `preventDefault=false` is passed as an option", function() {
+QUnit.test("the {{link-to}} helper does not call preventDefault if `preventDefault=false` is passed as an option", function() {
Ember.TEMPLATES.index = compile("{{#link-to 'about' id='about-link' preventDefault=false}}About{{/link-to}}");
Router.map(function() {
@@ -1164,7 +1164,7 @@ test("the {{link-to}} helper does not call preventDefault if `preventDefault=fal
equal(event.isDefaultPrevented(), false, "should not preventDefault");
});
-test("the {{link-to}} helper does not throw an error if its route has exited", function() {
+QUnit.test("the {{link-to}} helper does not throw an error if its route has exited", function() {
expect(0);
Ember.TEMPLATES.application = compile("{{#link-to 'index' id='home-link'}}Home{{/link-to}}{{#link-to 'post' defaultPost id='default-post-link'}}Default Post{{/link-to}}{{#if currentPost}}{{#link-to 'post' id='post-link'}}Post{{/link-to}}{{/if}}");
@@ -1195,7 +1195,7 @@ test("the {{link-to}} helper does not throw an error if its route has exited", f
});
});
-test("{{link-to}} active property respects changing parent route context", function() {
+QUnit.test("{{link-to}} active property respects changing parent route context", function() {
Ember.TEMPLATES.application = compile(
"{{link-to 'OMG' 'things' 'omg' id='omg-link'}} " +
"{{link-to 'LOL' 'things' 'lol' id='lol-link'}} ");
@@ -1219,7 +1219,7 @@ test("{{link-to}} active property respects changing parent route context", funct
});
-test("{{link-to}} populates href with default query param values even without query-params object", function() {
+QUnit.test("{{link-to}} populates href with default query param values even without query-params object", function() {
App.IndexController = Ember.Controller.extend({
queryParams: ['foo'],
foo: '123'
@@ -1230,7 +1230,7 @@ test("{{link-to}} populates href with default query param values even without qu
equal(Ember.$('#the-link').attr('href'), "/", "link has right href");
});
-test("{{link-to}} populates href with default query param values with empty query-params object", function() {
+QUnit.test("{{link-to}} populates href with default query param values with empty query-params object", function() {
App.IndexController = Ember.Controller.extend({
queryParams: ['foo'],
foo: '123'
@@ -1241,7 +1241,7 @@ test("{{link-to}} populates href with default query param values with empty quer
equal(Ember.$('#the-link').attr('href'), "/", "link has right href");
});
-test("{{link-to}} populates href with supplied query param values", function() {
+QUnit.test("{{link-to}} populates href with supplied query param values", function() {
App.IndexController = Ember.Controller.extend({
queryParams: ['foo'],
foo: '123'
@@ -1252,7 +1252,7 @@ test("{{link-to}} populates href with supplied query param values", function() {
equal(Ember.$('#the-link').attr('href'), "/?foo=456", "link has right href");
});
-test("{{link-to}} populates href with partially supplied query param values", function() {
+QUnit.test("{{link-to}} populates href with partially supplied query param values", function() {
App.IndexController = Ember.Controller.extend({
queryParams: ['foo', 'bar'],
foo: '123',
@@ -1264,7 +1264,7 @@ test("{{link-to}} populates href with partially supplied query param values", fu
equal(Ember.$('#the-link').attr('href'), "/?foo=456", "link has right href");
});
-test("{{link-to}} populates href with partially supplied query param values, but omits if value is default value", function() {
+QUnit.test("{{link-to}} populates href with partially supplied query param values, but omits if value is default value", function() {
App.IndexController = Ember.Controller.extend({
queryParams: ['foo', 'bar'],
foo: '123',
@@ -1276,7 +1276,7 @@ test("{{link-to}} populates href with partially supplied query param values, but
equal(Ember.$('#the-link').attr('href'), "/", "link has right href");
});
-test("{{link-to}} populates href with fully supplied query param values", function() {
+QUnit.test("{{link-to}} populates href with fully supplied query param values", function() {
App.IndexController = Ember.Controller.extend({
queryParams: ['foo', 'bar'],
foo: '123',
@@ -1315,7 +1315,7 @@ QUnit.module("The {{link-to}} helper: invoking with query params", {
teardown: sharedTeardown
});
-test("doesn't update controller QP properties on current route when invoked", function() {
+QUnit.test("doesn't update controller QP properties on current route when invoked", function() {
Ember.TEMPLATES.index = compile("{{#link-to 'index' id='the-link'}}Index{{/link-to}}");
bootApplication();
@@ -1324,7 +1324,7 @@ test("doesn't update controller QP properties on current route when invoked", fu
deepEqual(indexController.getProperties('foo', 'bar'), { foo: '123', bar: 'abc' }, "controller QP properties not");
});
-test("doesn't update controller QP properties on current route when invoked (empty query-params obj)", function() {
+QUnit.test("doesn't update controller QP properties on current route when invoked (empty query-params obj)", function() {
Ember.TEMPLATES.index = compile("{{#link-to 'index' (query-params) id='the-link'}}Index{{/link-to}}");
bootApplication();
@@ -1333,14 +1333,14 @@ test("doesn't update controller QP properties on current route when invoked (emp
deepEqual(indexController.getProperties('foo', 'bar'), { foo: '123', bar: 'abc' }, "controller QP properties not");
});
-test("link-to with no params throws", function() {
+QUnit.test("link-to with no params throws", function() {
Ember.TEMPLATES.index = compile("{{#link-to id='the-link'}}Index{{/link-to}}");
expectAssertion(function() {
bootApplication();
}, /one or more/);
});
-test("doesn't update controller QP properties on current route when invoked (empty query-params obj, inferred route)", function() {
+QUnit.test("doesn't update controller QP properties on current route when invoked (empty query-params obj, inferred route)", function() {
Ember.TEMPLATES.index = compile("{{#link-to (query-params) id='the-link'}}Index{{/link-to}}");
bootApplication();
@@ -1349,7 +1349,7 @@ test("doesn't update controller QP properties on current route when invoked (emp
deepEqual(indexController.getProperties('foo', 'bar'), { foo: '123', bar: 'abc' }, "controller QP properties not");
});
-test("updates controller QP properties on current route when invoked", function() {
+QUnit.test("updates controller QP properties on current route when invoked", function() {
Ember.TEMPLATES.index = compile("{{#link-to 'index' (query-params foo='456') id='the-link'}}Index{{/link-to}}");
bootApplication();
@@ -1358,7 +1358,7 @@ test("updates controller QP properties on current route when invoked", function(
deepEqual(indexController.getProperties('foo', 'bar'), { foo: '456', bar: 'abc' }, "controller QP properties updated");
});
-test("updates controller QP properties on current route when invoked (inferred route)", function() {
+QUnit.test("updates controller QP properties on current route when invoked (inferred route)", function() {
Ember.TEMPLATES.index = compile("{{#link-to (query-params foo='456') id='the-link'}}Index{{/link-to}}");
bootApplication();
@@ -1367,7 +1367,7 @@ test("updates controller QP properties on current route when invoked (inferred r
deepEqual(indexController.getProperties('foo', 'bar'), { foo: '456', bar: 'abc' }, "controller QP properties updated");
});
-test("updates controller QP properties on other route after transitioning to that route", function() {
+QUnit.test("updates controller QP properties on other route after transitioning to that route", function() {
Router.map(function() {
this.route('about');
});
@@ -1383,7 +1383,7 @@ test("updates controller QP properties on other route after transitioning to tha
equal(container.lookup('controller:application').get('currentPath'), "about");
});
-test("supplied QP properties can be bound", function() {
+QUnit.test("supplied QP properties can be bound", function() {
var indexController = container.lookup('controller:index');
Ember.TEMPLATES.index = compile("{{#link-to (query-params foo=boundThing) id='the-link'}}Index{{/link-to}}");
@@ -1394,7 +1394,7 @@ test("supplied QP properties can be bound", function() {
equal(Ember.$('#the-link').attr('href'), '/?foo=ASL');
});
-test("supplied QP properties can be bound (booleans)", function() {
+QUnit.test("supplied QP properties can be bound (booleans)", function() {
var indexController = container.lookup('controller:index');
Ember.TEMPLATES.index = compile("{{#link-to (query-params abool=boundThing) id='the-link'}}Index{{/link-to}}");
@@ -1409,7 +1409,7 @@ test("supplied QP properties can be bound (booleans)", function() {
deepEqual(indexController.getProperties('foo', 'bar', 'abool'), { foo: '123', bar: 'abc', abool: false });
});
-test("href updates when unsupplied controller QP props change", function() {
+QUnit.test("href updates when unsupplied controller QP props change", function() {
var indexController = container.lookup('controller:index');
Ember.TEMPLATES.index = compile("{{#link-to (query-params foo='lol') id='the-link'}}Index{{/link-to}}");
@@ -1422,7 +1422,7 @@ test("href updates when unsupplied controller QP props change", function() {
equal(Ember.$('#the-link').attr('href'), '/?bar=BORF&foo=lol');
});
-test("The {{link-to}} applies activeClass when query params are not changed", function() {
+QUnit.test("The {{link-to}} applies activeClass when query params are not changed", function() {
Ember.TEMPLATES.index = compile(
"{{#link-to (query-params foo='cat') id='cat-link'}}Index{{/link-to}} " +
"{{#link-to (query-params foo='dog') id='dog-link'}}Index{{/link-to}} " +
@@ -1512,7 +1512,7 @@ test("The {{link-to}} applies activeClass when query params are not changed", fu
shouldNotBeActive('#change-search-same-sort-child-and-parent');
});
-test("The {{link-to}} applies active class when query-param is number", function() {
+QUnit.test("The {{link-to}} applies active class when query-param is number", function() {
Ember.TEMPLATES.index = compile(
"{{#link-to (query-params page=pageNumber) id='page-link'}}Index{{/link-to}} ");
@@ -1529,7 +1529,7 @@ test("The {{link-to}} applies active class when query-param is number", function
shouldBeActive('#page-link');
});
-test("The {{link-to}} applies active class when query-param is array", function() {
+QUnit.test("The {{link-to}} applies active class when query-param is array", function() {
Ember.TEMPLATES.index = compile(
"{{#link-to (query-params pages=pagesArray) id='array-link'}}Index{{/link-to}} " +
"{{#link-to (query-params pages=biggerArray) id='bigger-link'}}Index{{/link-to}} " +
@@ -1561,7 +1561,7 @@ test("The {{link-to}} applies active class when query-param is array", function(
shouldNotBeActive('#empty-link');
});
-test("The {{link-to}} helper applies active class to parent route", function() {
+QUnit.test("The {{link-to}} helper applies active class to parent route", function() {
App.Router.map(function() {
this.resource('parent', function() {
this.route('child');
@@ -1589,7 +1589,7 @@ test("The {{link-to}} helper applies active class to parent route", function() {
shouldNotBeActive('#parent-link-qp');
});
-test("The {{link-to}} helper disregards query-params in activeness computation when current-when specified", function() {
+QUnit.test("The {{link-to}} helper disregards query-params in activeness computation when current-when specified", function() {
App.Router.map(function() {
this.route('parent');
});
@@ -1681,11 +1681,11 @@ if (!Ember.FEATURES.isEnabled('ember-routing-transitioning-classes')) {
}
});
- test("invoking a link-to with a slow promise eager updates url", function() {
+ QUnit.test("invoking a link-to with a slow promise eager updates url", function() {
basicEagerURLUpdateTest(false);
});
- test("when link-to eagerly updates url, the path it provides does NOT include the rootURL", function() {
+ QUnit.test("when link-to eagerly updates url, the path it provides does NOT include the rootURL", function() {
expect(2);
// HistoryLocation is the only Location class that will cause rootURL to be
@@ -1732,11 +1732,11 @@ if (!Ember.FEATURES.isEnabled('ember-routing-transitioning-classes')) {
equal(router.get('location.path'), '/about');
});
- test("non `a` tags also eagerly update URL", function() {
+ QUnit.test("non `a` tags also eagerly update URL", function() {
basicEagerURLUpdateTest(true);
});
- test("invoking a link-to with a promise that rejects on the run loop doesn't update url", function() {
+ QUnit.test("invoking a link-to with a promise that rejects on the run loop doesn't update url", function() {
App.AboutRoute = Ember.Route.extend({
model: function() {
return Ember.RSVP.reject();
@@ -1751,7 +1751,7 @@ if (!Ember.FEATURES.isEnabled('ember-routing-transitioning-classes')) {
equal(router.get('location.path'), '', 'url was not updated');
});
- test("invoking a link-to whose transition gets aborted in will transition doesn't update the url", function() {
+ QUnit.test("invoking a link-to whose transition gets aborted in will transition doesn't update the url", function() {
App.IndexRoute = Ember.Route.extend({
actions: {
willTransition: function(transition) {
@@ -1803,7 +1803,7 @@ if (Ember.FEATURES.isEnabled('ember-routing-transitioning-classes')) {
}
});
- test("while a transition is underway", function() {
+ QUnit.test("while a transition is underway", function() {
expect(18);
bootApplication();
diff --git a/packages/ember/tests/homepage_example_test.js b/packages/ember/tests/homepage_example_test.js
index 82b68299bbb..4918c147e75 100644
--- a/packages/ember/tests/homepage_example_test.js
+++ b/packages/ember/tests/homepage_example_test.js
@@ -70,7 +70,7 @@ QUnit.module("Homepage Example", {
});
-test("The example renders correctly", function() {
+QUnit.test("The example renders correctly", function() {
Ember.run(App, 'advanceReadiness');
equal($fixture.find('h1:contains(People)').length, 1);
diff --git a/packages/ember/tests/routing/basic_test.js b/packages/ember/tests/routing/basic_test.js
index 7f29a74e603..7e4badccbf5 100644
--- a/packages/ember/tests/routing/basic_test.js
+++ b/packages/ember/tests/routing/basic_test.js
@@ -89,7 +89,7 @@ QUnit.module("Basic Routing", {
}
});
-test("warn on URLs not included in the route set", function () {
+QUnit.test("warn on URLs not included in the route set", function () {
Router.map(function() {
this.route("home", { path: "/" });
});
@@ -104,7 +104,7 @@ test("warn on URLs not included in the route set", function () {
}, "The URL '/what-is-this-i-dont-even' did not match any routes in your application");
});
-test("The Homepage", function() {
+QUnit.test("The Homepage", function() {
Router.map(function() {
this.route("home", { path: "/" });
});
@@ -126,7 +126,7 @@ test("The Homepage", function() {
equal(Ember.$('h3:contains(Hours)', '#qunit-fixture').length, 1, "The home template was rendered");
});
-test("The Home page and the Camelot page with multiple Router.map calls", function() {
+QUnit.test("The Home page and the Camelot page with multiple Router.map calls", function() {
Router.map(function() {
this.route("home", { path: "/" });
});
@@ -168,7 +168,7 @@ test("The Home page and the Camelot page with multiple Router.map calls", functi
equal(Ember.$('h3:contains(Hours)', '#qunit-fixture').length, 1, "The home template was rendered");
});
-test("The Homepage register as activeView", function() {
+QUnit.test("The Homepage register as activeView", function() {
Router.map(function() {
this.route("home", { path: "/" });
this.route("homepage");
@@ -190,7 +190,7 @@ test("The Homepage register as activeView", function() {
equal(router._lookupActiveView('home'), undefined, '`home` active view is disconnected');
});
-test("The Homepage with explicit template name in renderTemplate", function() {
+QUnit.test("The Homepage with explicit template name in renderTemplate", function() {
Router.map(function() {
this.route("home", { path: "/" });
});
@@ -206,7 +206,7 @@ test("The Homepage with explicit template name in renderTemplate", function() {
equal(Ember.$('h3:contains(Megatroll)', '#qunit-fixture').length, 1, "The homepage template was rendered");
});
-test("An alternate template will pull in an alternate controller", function() {
+QUnit.test("An alternate template will pull in an alternate controller", function() {
Router.map(function() {
this.route("home", { path: "/" });
});
@@ -228,7 +228,7 @@ test("An alternate template will pull in an alternate controller", function() {
equal(Ember.$('h3:contains(Megatroll) + p:contains(Comes from homepage)', '#qunit-fixture').length, 1, "The homepage template was rendered");
});
-test("An alternate template will pull in an alternate controller instead of controllerName", function() {
+QUnit.test("An alternate template will pull in an alternate controller instead of controllerName", function() {
Router.map(function() {
this.route("home", { path: "/" });
});
@@ -257,7 +257,7 @@ test("An alternate template will pull in an alternate controller instead of cont
equal(Ember.$('h3:contains(Megatroll) + p:contains(Comes from homepage)', '#qunit-fixture').length, 1, "The homepage template was rendered");
});
-test("The template will pull in an alternate controller via key/value", function() {
+QUnit.test("The template will pull in an alternate controller via key/value", function() {
Router.map(function() {
this.route("homepage", { path: "/" });
});
@@ -279,7 +279,7 @@ test("The template will pull in an alternate controller via key/value", function
equal(Ember.$('h3:contains(Megatroll) + p:contains(Comes from home.)', '#qunit-fixture').length, 1, "The homepage template was rendered from data from the HomeController");
});
-test("The Homepage with explicit template name in renderTemplate and controller", function() {
+QUnit.test("The Homepage with explicit template name in renderTemplate and controller", function() {
Router.map(function() {
this.route("home", { path: "/" });
});
@@ -301,7 +301,7 @@ test("The Homepage with explicit template name in renderTemplate and controller"
equal(Ember.$('h3:contains(Megatroll) + p:contains(YES I AM HOME)', '#qunit-fixture').length, 1, "The homepage template was rendered");
});
-test("Model passed via renderTemplate model is set as controller's model", function() {
+QUnit.test("Model passed via renderTemplate model is set as controller's model", function() {
Ember.TEMPLATES['bio'] = compile("
{{model.name}}
");
App.BioController = Ember.Controller.extend();
@@ -323,7 +323,7 @@ test("Model passed via renderTemplate model is set as controller's model", funct
equal(Ember.$('p:contains(emberjs)', '#qunit-fixture').length, 1, "Passed model was set as controllers model");
});
-test("Renders correct view with slash notation", function() {
+QUnit.test("Renders correct view with slash notation", function() {
Ember.TEMPLATES['home/page'] = compile("
{{view.name}}
");
Router.map(function() {
@@ -345,7 +345,7 @@ test("Renders correct view with slash notation", function() {
equal(Ember.$('p:contains(Home/Page)', '#qunit-fixture').length, 1, "The homepage template was rendered");
});
-test("Renders the view given in the view option", function() {
+QUnit.test("Renders the view given in the view option", function() {
Ember.TEMPLATES['home'] = compile("
{{view.name}}
");
Router.map(function() {
@@ -367,7 +367,7 @@ test("Renders the view given in the view option", function() {
equal(Ember.$('p:contains(Home/Page)', '#qunit-fixture').length, 1, "The homepage view was rendered");
});
-test('render does not replace templateName if user provided', function() {
+QUnit.test('render does not replace templateName if user provided', function() {
Router.map(function() {
this.route("home", { path: "/" });
});
@@ -387,7 +387,7 @@ test('render does not replace templateName if user provided', function() {
equal(Ember.$('p', '#qunit-fixture').text(), "THIS IS THE REAL HOME", "The homepage template was rendered");
});
-test('render does not replace template if user provided', function () {
+QUnit.test('render does not replace template if user provided', function () {
Router.map(function () {
this.route("home", { path: "/" });
});
@@ -407,7 +407,7 @@ test('render does not replace template if user provided', function () {
equal(Ember.$('p', '#qunit-fixture').text(), "THIS IS THE REAL HOME", "The homepage template was rendered");
});
-test('render uses templateName from route', function() {
+QUnit.test('render uses templateName from route', function() {
Router.map(function() {
this.route("home", { path: "/" });
});
@@ -426,7 +426,7 @@ test('render uses templateName from route', function() {
equal(Ember.$('p', '#qunit-fixture').text(), "THIS IS THE REAL HOME", "The homepage template was rendered");
});
-test('defining templateName allows other templates to be rendered', function() {
+QUnit.test('defining templateName allows other templates to be rendered', function() {
Router.map(function() {
this.route("home", { path: "/" });
});
@@ -463,7 +463,7 @@ test('defining templateName allows other templates to be rendered', function() {
});
-test('Specifying a name to render should have precedence over everything else', function() {
+QUnit.test('Specifying a name to render should have precedence over everything else', function() {
Router.map(function() {
this.route("home", { path: "/" });
});
@@ -502,7 +502,7 @@ test('Specifying a name to render should have precedence over everything else',
equal(Ember.$('span', '#qunit-fixture').text(), "Outertroll", "The homepage view was used");
});
-test("The Homepage with a `setupController` hook", function() {
+QUnit.test("The Homepage with a `setupController` hook", function() {
Router.map(function() {
this.route("home", { path: "/" });
});
@@ -526,7 +526,7 @@ test("The Homepage with a `setupController` hook", function() {
equal(Ember.$('ul li', '#qunit-fixture').eq(2).text(), "Sunday: Noon to 6pm", "The template was rendered with the hours context");
});
-test("The route controller is still set when overriding the setupController hook", function() {
+QUnit.test("The route controller is still set when overriding the setupController hook", function() {
Router.map(function() {
this.route("home", { path: "/" });
});
@@ -545,7 +545,7 @@ test("The route controller is still set when overriding the setupController hook
deepEqual(container.lookup('route:home').controller, container.lookup('controller:home'), "route controller is the home controller");
});
-test("The route controller can be specified via controllerName", function() {
+QUnit.test("The route controller can be specified via controllerName", function() {
Router.map(function() {
this.route("home", { path: "/" });
});
@@ -568,7 +568,7 @@ test("The route controller can be specified via controllerName", function() {
equal(Ember.$('p', '#qunit-fixture').text(), "foo", "The homepage template was rendered with data from the custom controller");
});
-test("The route controller specified via controllerName is used in render", function() {
+QUnit.test("The route controller specified via controllerName is used in render", function() {
Router.map(function() {
this.route("home", { path: "/" });
});
@@ -594,7 +594,7 @@ test("The route controller specified via controllerName is used in render", func
equal(Ember.$('p', '#qunit-fixture').text(), "alternative home: foo", "The homepage template was rendered with data from the custom controller");
});
-test("The route controller specified via controllerName is used in render even when a controller with the routeName is available", function() {
+QUnit.test("The route controller specified via controllerName is used in render even when a controller with the routeName is available", function() {
Router.map(function() {
this.route("home", { path: "/" });
});
@@ -621,7 +621,7 @@ test("The route controller specified via controllerName is used in render even w
equal(Ember.$('p', '#qunit-fixture').text(), "home: myController", "The homepage template was rendered with data from the custom controller");
});
-test("The Homepage with a `setupController` hook modifying other controllers", function() {
+QUnit.test("The Homepage with a `setupController` hook modifying other controllers", function() {
Router.map(function() {
this.route("home", { path: "/" });
});
@@ -645,7 +645,7 @@ test("The Homepage with a `setupController` hook modifying other controllers", f
equal(Ember.$('ul li', '#qunit-fixture').eq(2).text(), "Sunday: Noon to 6pm", "The template was rendered with the hours context");
});
-test("The Homepage with a computed context that does not get overridden", function() {
+QUnit.test("The Homepage with a computed context that does not get overridden", function() {
Router.map(function() {
this.route("home", { path: "/" });
});
@@ -669,7 +669,7 @@ test("The Homepage with a computed context that does not get overridden", functi
equal(Ember.$('ul li', '#qunit-fixture').eq(2).text(), "Sunday: Noon to 6pm", "The template was rendered with the context intact");
});
-test("The Homepage getting its controller context via model", function() {
+QUnit.test("The Homepage getting its controller context via model", function() {
Router.map(function() {
this.route("home", { path: "/" });
});
@@ -699,7 +699,7 @@ test("The Homepage getting its controller context via model", function() {
equal(Ember.$('ul li', '#qunit-fixture').eq(2).text(), "Sunday: Noon to 6pm", "The template was rendered with the hours context");
});
-test("The Specials Page getting its controller context by deserializing the params hash", function() {
+QUnit.test("The Specials Page getting its controller context by deserializing the params hash", function() {
Router.map(function() {
this.route("home", { path: "/" });
this.resource("special", { path: "/specials/:menu_item_id" });
@@ -730,7 +730,7 @@ test("The Specials Page getting its controller context by deserializing the para
equal(Ember.$('p', '#qunit-fixture').text(), "1", "The model was used to render the template");
});
-test("The Specials Page defaults to looking models up via `find`", function() {
+QUnit.test("The Specials Page defaults to looking models up via `find`", function() {
Router.map(function() {
this.route("home", { path: "/" });
this.resource("special", { path: "/specials/:menu_item_id" });
@@ -764,7 +764,7 @@ test("The Specials Page defaults to looking models up via `find`", function() {
equal(Ember.$('p', '#qunit-fixture').text(), "1", "The model was used to render the template");
});
-test("The Special Page returning a promise puts the app into a loading state until the promise is resolved", function() {
+QUnit.test("The Special Page returning a promise puts the app into a loading state until the promise is resolved", function() {
Router.map(function() {
this.route("home", { path: "/" });
this.resource("special", { path: "/specials/:menu_item_id" });
@@ -816,7 +816,7 @@ test("The Special Page returning a promise puts the app into a loading state unt
equal(Ember.$('p', '#qunit-fixture').text(), "1", "The app is now in the specials state");
});
-test("The loading state doesn't get entered for promises that resolve on the same run loop", function() {
+QUnit.test("The loading state doesn't get entered for promises that resolve on the same run loop", function() {
Router.map(function() {
this.route("home", { path: "/" });
this.resource("special", { path: "/specials/:menu_item_id" });
@@ -894,7 +894,7 @@ asyncTest("The Special page returning an error fires the error hook on SpecialRo
});
*/
-test("The Special page returning an error invokes SpecialRoute's error handler", function() {
+QUnit.test("The Special page returning an error invokes SpecialRoute's error handler", function() {
Router.map(function() {
this.route("home", { path: "/" });
this.resource("special", { path: "/specials/:menu_item_id" });
@@ -979,11 +979,11 @@ function testOverridableErrorHandler(handlersName) {
});
}
-test("ApplicationRoute's default error handler can be overridden", function() {
+QUnit.test("ApplicationRoute's default error handler can be overridden", function() {
testOverridableErrorHandler('actions');
});
-test("ApplicationRoute's default error handler can be overridden (with DEPRECATED `events`)", function() {
+QUnit.test("ApplicationRoute's default error handler can be overridden (with DEPRECATED `events`)", function() {
ignoreDeprecation(function() {
testOverridableErrorHandler('events');
});
@@ -1336,7 +1336,7 @@ asyncTest("Events defined in `events` object are triggered on the current state
action.handler(event);
});
-test("Events can be handled by inherited event handlers", function() {
+QUnit.test("Events can be handled by inherited event handlers", function() {
expect(4);
@@ -1457,7 +1457,7 @@ asyncTest("actions can be triggered with multiple arguments", function() {
action.handler(event);
});
-test("transitioning multiple times in a single run loop only sets the URL once", function() {
+QUnit.test("transitioning multiple times in a single run loop only sets the URL once", function() {
Router.map(function() {
this.route("root", { path: "/" });
this.route("foo");
@@ -1484,7 +1484,7 @@ test("transitioning multiple times in a single run loop only sets the URL once",
equal(router.get('location').getURL(), "/bar");
});
-test('navigating away triggers a url property change', function() {
+QUnit.test('navigating away triggers a url property change', function() {
expect(3);
@@ -1507,7 +1507,7 @@ test('navigating away triggers a url property change', function() {
});
});
-test("using replaceWith calls location.replaceURL if available", function() {
+QUnit.test("using replaceWith calls location.replaceURL if available", function() {
var setCount = 0;
var replaceCount = 0;
@@ -1544,7 +1544,7 @@ test("using replaceWith calls location.replaceURL if available", function() {
equal(router.get('location').getURL(), "/foo");
});
-test("using replaceWith calls setURL if location.replaceURL is not defined", function() {
+QUnit.test("using replaceWith calls setURL if location.replaceURL is not defined", function() {
var setCount = 0;
Router.reopen({
@@ -1573,7 +1573,7 @@ test("using replaceWith calls setURL if location.replaceURL is not defined", fun
equal(router.get('location').getURL(), "/foo");
});
-test("Route inherits model from parent route", function() {
+QUnit.test("Route inherits model from parent route", function() {
expect(9);
Router.map(function() {
@@ -1648,7 +1648,7 @@ test("Route inherits model from parent route", function() {
handleURL("/posts/3/shares/3");
});
-test("Resource inherits model from parent resource", function() {
+QUnit.test("Resource inherits model from parent resource", function() {
expect(6);
Router.map(function() {
@@ -1695,7 +1695,7 @@ test("Resource inherits model from parent resource", function() {
handleURL("/posts/3/comments");
});
-test("It is possible to get the model from a parent route", function() {
+QUnit.test("It is possible to get the model from a parent route", function() {
expect(9);
Router.map(function() {
@@ -1741,7 +1741,7 @@ test("It is possible to get the model from a parent route", function() {
handleURL("/posts/3/comments");
});
-test("A redirection hook is provided", function() {
+QUnit.test("A redirection hook is provided", function() {
Router.map(function() {
this.route("choose", { path: "/" });
this.route("home");
@@ -1771,7 +1771,7 @@ test("A redirection hook is provided", function() {
equal(router.container.lookup('controller:application').get('currentPath'), 'home');
});
-test("Redirecting from the middle of a route aborts the remainder of the routes", function() {
+QUnit.test("Redirecting from the middle of a route aborts the remainder of the routes", function() {
expect(3);
Router.map(function() {
@@ -1806,7 +1806,7 @@ test("Redirecting from the middle of a route aborts the remainder of the routes"
equal(router.get('location').getURL(), "/home");
});
-test("Redirecting to the current target in the middle of a route does not abort initial routing", function() {
+QUnit.test("Redirecting to the current target in the middle of a route does not abort initial routing", function() {
expect(5);
Router.map(function() {
@@ -1846,7 +1846,7 @@ test("Redirecting to the current target in the middle of a route does not abort
});
-test("Redirecting to the current target with a different context aborts the remainder of the routes", function() {
+QUnit.test("Redirecting to the current target with a different context aborts the remainder of the routes", function() {
expect(4);
Router.map(function() {
@@ -1890,7 +1890,7 @@ test("Redirecting to the current target with a different context aborts the rema
equal(router.get('location').getURL(), "/foo/bar/2/baz");
});
-test("Transitioning from a parent event does not prevent currentPath from being set", function() {
+QUnit.test("Transitioning from a parent event does not prevent currentPath from being set", function() {
Router.map(function() {
this.resource("foo", function() {
this.resource("bar", function() {
@@ -1924,7 +1924,7 @@ test("Transitioning from a parent event does not prevent currentPath from being
equal(router.get('location').getURL(), "/foo/qux");
});
-test("Generated names can be customized when providing routes with dot notation", function() {
+QUnit.test("Generated names can be customized when providing routes with dot notation", function() {
expect(4);
Ember.TEMPLATES.index = compile("
Index
");
@@ -1970,7 +1970,7 @@ test("Generated names can be customized when providing routes with dot notation"
equal(Ember.$('.main .middle .bottom p', '#qunit-fixture').text(), "BarBazBottom!", "The templates were rendered into their appropriate parents");
});
-test("Child routes render into their parent route's template by default", function() {
+QUnit.test("Child routes render into their parent route's template by default", function() {
Ember.TEMPLATES.index = compile("
Index
");
Ember.TEMPLATES.application = compile("
Home
{{outlet}}
");
Ember.TEMPLATES.top = compile("
{{outlet}}
");
@@ -1992,7 +1992,7 @@ test("Child routes render into their parent route's template by default", functi
equal(Ember.$('.main .middle .bottom p', '#qunit-fixture').text(), "Bottom!", "The templates were rendered into their appropriate parents");
});
-test("Child routes render into specified template", function() {
+QUnit.test("Child routes render into specified template", function() {
Ember.TEMPLATES.index = compile("
Index
");
Ember.TEMPLATES.application = compile("
Home
{{outlet}}
");
Ember.TEMPLATES.top = compile("
{{outlet}}
");
@@ -2021,7 +2021,7 @@ test("Child routes render into specified template", function() {
equal(Ember.$('.main .middle > p', '#qunit-fixture').text(), "Bottom!", "The template was rendered into the top template");
});
-test("Rendering into specified template with slash notation", function() {
+QUnit.test("Rendering into specified template with slash notation", function() {
Ember.TEMPLATES['person/profile'] = compile("profile {{outlet}}");
Ember.TEMPLATES['person/details'] = compile("details!");
@@ -2041,7 +2041,7 @@ test("Rendering into specified template with slash notation", function() {
equal(Ember.$('#qunit-fixture:contains(profile details!)').length, 1, "The templates were rendered");
});
-test("Parent route context change", function() {
+QUnit.test("Parent route context change", function() {
var editCount = 0;
var editedPostIds = Ember.A();
@@ -2111,7 +2111,7 @@ test("Parent route context change", function() {
deepEqual(editedPostIds, ['1', '2'], 'modelFor posts.post returns the right context');
});
-test("Router accounts for rootURL on page load when using history location", function() {
+QUnit.test("Router accounts for rootURL on page load when using history location", function() {
var rootURL = window.location.pathname + '/app';
var postsTemplateRendered = false;
var setHistory, HistoryTestLocation;
@@ -2166,7 +2166,7 @@ test("Router accounts for rootURL on page load when using history location", fun
ok(postsTemplateRendered, "Posts route successfully stripped from rootURL");
});
-test("The rootURL is passed properly to the location implementation", function() {
+QUnit.test("The rootURL is passed properly to the location implementation", function() {
expect(1);
var rootURL = "/blahzorz";
var HistoryTestLocation;
@@ -2192,7 +2192,7 @@ test("The rootURL is passed properly to the location implementation", function()
});
-test("Only use route rendered into main outlet for default into property on child", function() {
+QUnit.test("Only use route rendered into main outlet for default into property on child", function() {
Ember.TEMPLATES.application = compile("{{outlet 'menu'}}{{outlet}}");
Ember.TEMPLATES.posts = compile("{{outlet}}");
Ember.TEMPLATES['posts/index'] = compile("postsIndex");
@@ -2231,7 +2231,7 @@ test("Only use route rendered into main outlet for default into property on chil
equal(Ember.$('p.posts-index:contains(postsIndex)', '#qunit-fixture').length, 1, "The posts/index template was rendered");
});
-test("Generating a URL should not affect currentModel", function() {
+QUnit.test("Generating a URL should not affect currentModel", function() {
Router.map(function() {
this.route("post", { path: "/posts/:post_id" });
});
@@ -2261,7 +2261,7 @@ test("Generating a URL should not affect currentModel", function() {
});
-test("Generated route should be an instance of App.Route if provided", function() {
+QUnit.test("Generated route should be an instance of App.Route if provided", function() {
var generatedRoute;
Router.map(function() {
@@ -2280,7 +2280,7 @@ test("Generated route should be an instance of App.Route if provided", function(
});
-test("Nested index route is not overriden by parent's implicit index route", function() {
+QUnit.test("Nested index route is not overriden by parent's implicit index route", function() {
Router.map(function() {
this.resource('posts', function() {
this.route('index', { path: ':category' });
@@ -2302,7 +2302,7 @@ test("Nested index route is not overriden by parent's implicit index route", fun
deepEqual(router.location.path, '/posts/emberjs');
});
-test("Application template does not duplicate when re-rendered", function() {
+QUnit.test("Application template does not duplicate when re-rendered", function() {
Ember.TEMPLATES.application = compile("
I Render Once
{{outlet}}");
Router.map(function() {
@@ -2323,7 +2323,7 @@ test("Application template does not duplicate when re-rendered", function() {
equal(Ember.$('h3:contains(I Render Once)').size(), 1);
});
-test("Child routes should render inside the application template if the application template causes a redirect", function() {
+QUnit.test("Child routes should render inside the application template if the application template causes a redirect", function() {
Ember.TEMPLATES.application = compile("
App
{{outlet}}");
Ember.TEMPLATES.posts = compile("posts");
@@ -2343,7 +2343,7 @@ test("Child routes should render inside the application template if the applicat
equal(Ember.$('#qunit-fixture > div').text(), "App posts");
});
-test("The template is not re-rendered when the route's context changes", function() {
+QUnit.test("The template is not re-rendered when the route's context changes", function() {
Router.map(function() {
this.route("page", { path: "/page/:name" });
});
@@ -2386,7 +2386,7 @@ test("The template is not re-rendered when the route's context changes", functio
});
-test("The template is not re-rendered when two routes present the exact same template, view, & controller", function() {
+QUnit.test("The template is not re-rendered when two routes present the exact same template, view, & controller", function() {
Router.map(function() {
this.route("first");
this.route("second");
@@ -2461,7 +2461,7 @@ test("The template is not re-rendered when two routes present the exact same tem
equal(insertionCount, 2, "view should have inserted a second time");
});
-test("ApplicationRoute with model does not proxy the currentPath", function() {
+QUnit.test("ApplicationRoute with model does not proxy the currentPath", function() {
var model = {};
var currentPath;
@@ -2481,7 +2481,7 @@ test("ApplicationRoute with model does not proxy the currentPath", function() {
equal('currentPath' in model, false, 'should have defined currentPath on controller');
});
-test("Promises encountered on app load put app into loading state until resolved", function() {
+QUnit.test("Promises encountered on app load put app into loading state until resolved", function() {
expect(2);
@@ -2503,7 +2503,7 @@ test("Promises encountered on app load put app into loading state until resolved
equal(Ember.$('p', '#qunit-fixture').text(), "INDEX", "The index route is display.");
});
-test("Route should tear down multiple outlets", function() {
+QUnit.test("Route should tear down multiple outlets", function() {
Ember.TEMPLATES.application = compile("{{outlet 'menu'}}{{outlet}}{{outlet 'footer'}}");
Ember.TEMPLATES.posts = compile("{{outlet}}");
Ember.TEMPLATES.users = compile("users");
@@ -2566,7 +2566,7 @@ test("Route should tear down multiple outlets", function() {
});
-test("Route supports clearing outlet explicitly", function() {
+QUnit.test("Route supports clearing outlet explicitly", function() {
Ember.TEMPLATES.application = compile("{{outlet}}{{outlet 'modal'}}");
Ember.TEMPLATES.posts = compile("{{outlet}}");
Ember.TEMPLATES.users = compile("users");
@@ -2649,7 +2649,7 @@ test("Route supports clearing outlet explicitly", function() {
equal(Ember.$('div.posts-extra:contains(postsExtra)', '#qunit-fixture').length, 0, "The posts/extra template was removed");
});
-test("Route supports clearing outlet using string parameter", function() {
+QUnit.test("Route supports clearing outlet using string parameter", function() {
Ember.TEMPLATES.application = compile("{{outlet}}{{outlet 'modal'}}");
Ember.TEMPLATES.posts = compile("{{outlet}}");
Ember.TEMPLATES.users = compile("users");
@@ -2704,7 +2704,7 @@ test("Route supports clearing outlet using string parameter", function() {
equal(Ember.$('div.posts-modal:contains(postsModal)', '#qunit-fixture').length, 0, "The posts/modal template was removed");
});
-test("Route silently fails when cleaning an outlet from an inactive view", function() {
+QUnit.test("Route silently fails when cleaning an outlet from an inactive view", function() {
expect(1); // handleURL
Ember.TEMPLATES.application = compile("{{outlet}}");
@@ -2739,7 +2739,7 @@ test("Route silently fails when cleaning an outlet from an inactive view", funct
});
if (Ember.FEATURES.isEnabled('ember-router-willtransition')) {
- test("Router `willTransition` hook passes in cancellable transition", function() {
+ QUnit.test("Router `willTransition` hook passes in cancellable transition", function() {
// Should hit willTransition 3 times, once for the initial route, and then 2 more times
// for the two handleURL calls below
expect(3);
@@ -2786,7 +2786,7 @@ if (Ember.FEATURES.isEnabled('ember-router-willtransition')) {
});
}
-test("Aborting/redirecting the transition in `willTransition` prevents LoadingRoute from being entered", function() {
+QUnit.test("Aborting/redirecting the transition in `willTransition` prevents LoadingRoute from being entered", function() {
expect(8);
Router.map(function() {
@@ -2855,7 +2855,7 @@ test("Aborting/redirecting the transition in `willTransition` prevents LoadingRo
Ember.run(deferred.resolve);
});
-test("`didTransition` event fires on the router", function() {
+QUnit.test("`didTransition` event fires on the router", function() {
expect(3);
Router.map(function() {
@@ -2877,7 +2877,7 @@ test("`didTransition` event fires on the router", function() {
Ember.run(router, 'transitionTo', 'nork');
});
-test("`didTransition` can be reopened", function() {
+QUnit.test("`didTransition` can be reopened", function() {
expect(1);
Router.map(function() {
@@ -2894,7 +2894,7 @@ test("`didTransition` can be reopened", function() {
bootApplication();
});
-test("`activate` event fires on the route", function() {
+QUnit.test("`activate` event fires on the route", function() {
expect(2);
var eventFired = 0;
@@ -2922,7 +2922,7 @@ test("`activate` event fires on the route", function() {
Ember.run(router, 'transitionTo', 'nork');
});
-test("`deactivate` event fires on the route", function() {
+QUnit.test("`deactivate` event fires on the route", function() {
expect(2);
var eventFired = 0;
@@ -2952,7 +2952,7 @@ test("`deactivate` event fires on the route", function() {
Ember.run(router, 'transitionTo', 'dork');
});
-test("Actions can be handled by inherited action handlers", function() {
+QUnit.test("Actions can be handled by inherited action handlers", function() {
expect(4);
@@ -2991,7 +2991,7 @@ test("Actions can be handled by inherited action handlers", function() {
router.send("baz");
});
-test("currentRouteName is a property installed on ApplicationController that can be used in transitionTo", function() {
+QUnit.test("currentRouteName is a property installed on ApplicationController that can be used in transitionTo", function() {
expect(24);
@@ -3032,7 +3032,7 @@ test("currentRouteName is a property installed on ApplicationController that can
transitionAndCheck('each.other', 'be.excellent.to.each.other', 'each.other');
});
-test("Route model hook finds the same model as a manual find", function() {
+QUnit.test("Route model hook finds the same model as a manual find", function() {
var Post;
App.Post = Ember.Object.extend();
App.Post.reopenClass({
@@ -3053,7 +3053,7 @@ test("Route model hook finds the same model as a manual find", function() {
equal(App.Post, Post);
});
-test("Can register an implementation via Ember.Location.registerImplementation (DEPRECATED)", function() {
+QUnit.test("Can register an implementation via Ember.Location.registerImplementation (DEPRECATED)", function() {
var TestLocation = Ember.NoneLocation.extend({
implementation: 'test'
});
@@ -3071,7 +3071,7 @@ test("Can register an implementation via Ember.Location.registerImplementation (
equal(router.get('location.implementation'), 'test', 'custom location implementation can be registered with registerImplementation');
});
-test("Ember.Location.registerImplementation is deprecated", function() {
+QUnit.test("Ember.Location.registerImplementation is deprecated", function() {
var TestLocation = Ember.NoneLocation.extend({
implementation: 'test'
});
@@ -3081,7 +3081,7 @@ test("Ember.Location.registerImplementation is deprecated", function() {
}, "Using the Ember.Location.registerImplementation is no longer supported. Register your custom location implementation with the container instead.");
});
-test("Routes can refresh themselves causing their model hooks to be re-run", function() {
+QUnit.test("Routes can refresh themselves causing their model hooks to be re-run", function() {
Router.map(function() {
this.resource('parent', { path: '/parent/:parent_id' }, function() {
this.route('child');
@@ -3134,7 +3134,7 @@ test("Routes can refresh themselves causing their model hooks to be re-run", fun
equal(childcount, 2);
});
-test("Specifying non-existent controller name in route#render throws", function() {
+QUnit.test("Specifying non-existent controller name in route#render throws", function() {
expect(1);
Router.map(function() {
@@ -3154,7 +3154,7 @@ test("Specifying non-existent controller name in route#render throws", function(
bootApplication();
});
-test("Redirecting with null model doesn't error out", function() {
+QUnit.test("Redirecting with null model doesn't error out", function() {
Router.map(function() {
this.route("home", { path: '/' });
this.route("about", { path: '/about/:hurhurhur' });
@@ -3179,7 +3179,7 @@ test("Redirecting with null model doesn't error out", function() {
equal(router.get('location.path'), "/about/TreeklesMcGeekles");
});
-test("rejecting the model hooks promise with a non-error prints the `message` property", function() {
+QUnit.test("rejecting the model hooks promise with a non-error prints the `message` property", function() {
var rejectedMessage = 'OMG!! SOOOOOO BAD!!!!';
var rejectedStack = 'Yeah, buddy: stack gets printed too.';
@@ -3202,7 +3202,7 @@ test("rejecting the model hooks promise with a non-error prints the `message` pr
bootApplication();
});
-test("rejecting the model hooks promise with no reason still logs error", function() {
+QUnit.test("rejecting the model hooks promise with no reason still logs error", function() {
Router.map(function() {
this.route("wowzers", { path: "/" });
});
@@ -3220,7 +3220,7 @@ test("rejecting the model hooks promise with no reason still logs error", functi
bootApplication();
});
-test("rejecting the model hooks promise with a string shows a good error", function() {
+QUnit.test("rejecting the model hooks promise with a string shows a good error", function() {
var originalLoggerError = Ember.Logger.error;
var rejectedMessage = "Supercalifragilisticexpialidocious";
@@ -3244,7 +3244,7 @@ test("rejecting the model hooks promise with a string shows a good error", funct
Ember.Logger.error = originalLoggerError;
});
-test("willLeave, willChangeContext, willChangeModel actions don't fire unless feature flag enabled", function() {
+QUnit.test("willLeave, willChangeContext, willChangeModel actions don't fire unless feature flag enabled", function() {
expect(1);
App.Router.map(function() {
@@ -3273,7 +3273,7 @@ test("willLeave, willChangeContext, willChangeModel actions don't fire unless fe
Ember.run(router, 'transitionTo', 'about');
});
-test("Errors in transitionTo within redirect hook are logged", function() {
+QUnit.test("Errors in transitionTo within redirect hook are logged", function() {
expect(3);
var actual = [];
@@ -3300,7 +3300,7 @@ test("Errors in transitionTo within redirect hook are logged", function() {
ok(actual[0][1].match(/More context objects were passed than there are dynamic segments for the route: stink-bomb/), 'the error is printed');
});
-test("Errors in transition show error template if available", function() {
+QUnit.test("Errors in transition show error template if available", function() {
Ember.TEMPLATES.error = compile("
Error!
");
Router.map(function() {
@@ -3319,7 +3319,7 @@ test("Errors in transition show error template if available", function() {
equal(Ember.$('#error').length, 1, "Error template was rendered.");
});
-test("Route#resetController gets fired when changing models and exiting routes", function() {
+QUnit.test("Route#resetController gets fired when changing models and exiting routes", function() {
expect(4);
Router.map(function() {
@@ -3362,7 +3362,7 @@ test("Route#resetController gets fired when changing models and exiting routes",
deepEqual(calls, [['reset', 'c'], ['reset', 'a'], ['setup', 'out']]);
});
-test("Exception during initialization of non-initial route is not swallowed", function() {
+QUnit.test("Exception during initialization of non-initial route is not swallowed", function() {
Router.map(function() {
this.route('boom');
});
@@ -3378,7 +3378,7 @@ test("Exception during initialization of non-initial route is not swallowed", fu
});
-test("Exception during load of non-initial route is not swallowed", function() {
+QUnit.test("Exception during load of non-initial route is not swallowed", function() {
Router.map(function() {
this.route('boom');
});
@@ -3400,7 +3400,7 @@ test("Exception during load of non-initial route is not swallowed", function() {
});
});
-test("Exception during initialization of initial route is not swallowed", function() {
+QUnit.test("Exception during initialization of initial route is not swallowed", function() {
Router.map(function() {
this.route('boom', { path: '/' });
});
@@ -3414,7 +3414,7 @@ test("Exception during initialization of initial route is not swallowed", functi
}, /\bboom\b/);
});
-test("Exception during load of initial route is not swallowed", function() {
+QUnit.test("Exception during load of initial route is not swallowed", function() {
Router.map(function() {
this.route('boom', { path: '/' });
});
diff --git a/packages/ember/tests/routing/query_params_test.js b/packages/ember/tests/routing/query_params_test.js
index 5073ef9c674..6a5051eb96c 100644
--- a/packages/ember/tests/routing/query_params_test.js
+++ b/packages/ember/tests/routing/query_params_test.js
@@ -120,7 +120,7 @@ QUnit.module("Routing w/ Query Params", {
}
});
-test("Single query params can be set", function() {
+QUnit.test("Single query params can be set", function() {
Router.map(function() {
this.route("home", { path: '/' });
});
@@ -142,7 +142,7 @@ test("Single query params can be set", function() {
equal(router.get('location.path'), "/?foo=987");
});
-test("Query params can map to different url keys", function() {
+QUnit.test("Query params can map to different url keys", function() {
App.IndexController = Ember.Controller.extend({
queryParams: [{ foo: 'other_foo', bar: { as: 'other_bar' } }],
foo: "FOO",
@@ -167,7 +167,7 @@ test("Query params can map to different url keys", function() {
});
-test("Routes have overridable serializeQueryParamKey hook", function() {
+QUnit.test("Routes have overridable serializeQueryParamKey hook", function() {
App.IndexRoute = Ember.Route.extend({
serializeQueryParamKey: Ember.String.dasherize
});
@@ -186,7 +186,7 @@ test("Routes have overridable serializeQueryParamKey hook", function() {
equal(router.get('location.path'), "/?fun-times=woot");
});
-test("No replaceURL occurs on startup because default values don't show up in URL", function() {
+QUnit.test("No replaceURL occurs on startup because default values don't show up in URL", function() {
expect(0);
App.IndexController = Ember.Controller.extend({
@@ -199,7 +199,7 @@ test("No replaceURL occurs on startup because default values don't show up in UR
bootApplication();
});
-test("Can override inherited QP behavior by specifying queryParams as a computed property", function() {
+QUnit.test("Can override inherited QP behavior by specifying queryParams as a computed property", function() {
expect(0);
var SharedMixin = Ember.Mixin.create({
queryParams: ['a'],
@@ -220,7 +220,7 @@ test("Can override inherited QP behavior by specifying queryParams as a computed
Ember.run(indexController, 'set', 'a', 1);
});
-test("model hooks receives query params", function() {
+QUnit.test("model hooks receives query params", function() {
App.IndexController = Ember.Controller.extend({
queryParams: ['omg'],
omg: 'lol'
@@ -237,7 +237,7 @@ test("model hooks receives query params", function() {
equal(router.get('location.path'), "");
});
-test("controllers won't be eagerly instantiated by internal query params logic", function() {
+QUnit.test("controllers won't be eagerly instantiated by internal query params logic", function() {
expect(10);
Router.map(function() {
this.resource('cats', function() {
@@ -329,7 +329,7 @@ test("controllers won't be eagerly instantiated by internal query params logic",
equal(router.get('location.path'), "/cats?name=domino", 'url is correct');
});
-test("model hooks receives query params (overridden by incoming url value)", function() {
+QUnit.test("model hooks receives query params (overridden by incoming url value)", function() {
App.IndexController = Ember.Controller.extend({
queryParams: ['omg'],
omg: 'lol'
@@ -347,7 +347,7 @@ test("model hooks receives query params (overridden by incoming url value)", fun
equal(router.get('location.path'), "/?omg=yes");
});
-test("Route#paramsFor fetches query params", function() {
+QUnit.test("Route#paramsFor fetches query params", function() {
expect(1);
Router.map(function() {
@@ -369,7 +369,7 @@ test("Route#paramsFor fetches query params", function() {
bootApplication();
});
-test("Route#paramsFor fetches falsy query params", function() {
+QUnit.test("Route#paramsFor fetches falsy query params", function() {
expect(1);
App.IndexController = Ember.Controller.extend({
@@ -387,7 +387,7 @@ test("Route#paramsFor fetches falsy query params", function() {
bootApplication();
});
-test("model hook can query prefix-less application params", function() {
+QUnit.test("model hook can query prefix-less application params", function() {
App.ApplicationController = Ember.Controller.extend({
queryParams: ['appomg'],
appomg: 'applol'
@@ -416,7 +416,7 @@ test("model hook can query prefix-less application params", function() {
equal(router.get('location.path'), "");
});
-test("model hook can query prefix-less application params (overridden by incoming url value)", function() {
+QUnit.test("model hook can query prefix-less application params (overridden by incoming url value)", function() {
App.ApplicationController = Ember.Controller.extend({
queryParams: ['appomg'],
appomg: 'applol'
@@ -446,7 +446,7 @@ test("model hook can query prefix-less application params (overridden by incomin
equal(router.get('location.path'), "/?appomg=appyes&omg=yes");
});
-test("can opt into full transition by setting refreshModel in route queryParams", function() {
+QUnit.test("can opt into full transition by setting refreshModel in route queryParams", function() {
expect(6);
App.ApplicationController = Ember.Controller.extend({
queryParams: ['appomg'],
@@ -495,7 +495,7 @@ test("can opt into full transition by setting refreshModel in route queryParams"
equal(indexModelCount, 2);
});
-test("Use Ember.get to retrieve query params 'refreshModel' configuration", function() {
+QUnit.test("Use Ember.get to retrieve query params 'refreshModel' configuration", function() {
expect(6);
App.ApplicationController = Ember.Controller.extend({
queryParams: ['appomg'],
@@ -544,7 +544,7 @@ test("Use Ember.get to retrieve query params 'refreshModel' configuration", func
equal(indexModelCount, 2);
});
-test("can use refreshModel even w URL changes that remove QPs from address bar", function() {
+QUnit.test("can use refreshModel even w URL changes that remove QPs from address bar", function() {
expect(4);
App.IndexController = Ember.Controller.extend({
@@ -581,7 +581,7 @@ test("can use refreshModel even w URL changes that remove QPs from address bar",
equal(indexController.get('omg'), 'lol');
});
-test("warn user that routes query params configuration must be an Object, not an Array", function() {
+QUnit.test("warn user that routes query params configuration must be an Object, not an Array", function() {
expect(1);
App.ApplicationRoute = Ember.Route.extend({
@@ -595,7 +595,7 @@ test("warn user that routes query params configuration must be an Object, not an
}, 'You passed in `[{"commitBy":{"replace":true}}]` as the value for `queryParams` but `queryParams` cannot be an Array');
});
-test("can opt into a replace query by specifying replace:true in the Router config hash", function() {
+QUnit.test("can opt into a replace query by specifying replace:true in the Router config hash", function() {
expect(2);
App.ApplicationController = Ember.Controller.extend({
queryParams: ['alex'],
@@ -619,7 +619,7 @@ test("can opt into a replace query by specifying replace:true in the Router conf
setAndFlush(appController, 'alex', 'wallace');
});
-test("Route query params config can be configured using property name instead of URL key", function() {
+QUnit.test("Route query params config can be configured using property name instead of URL key", function() {
expect(2);
App.ApplicationController = Ember.Controller.extend({
queryParams: [
@@ -644,7 +644,7 @@ test("Route query params config can be configured using property name instead of
setAndFlush(appController, 'commitBy', 'igor_seb');
});
-test("An explicit replace:false on a changed QP always wins and causes a pushState", function() {
+QUnit.test("An explicit replace:false on a changed QP always wins and causes a pushState", function() {
expect(3);
App.ApplicationController = Ember.Controller.extend({
queryParams: ['alex', 'steely'],
@@ -676,7 +676,7 @@ test("An explicit replace:false on a changed QP always wins and causes a pushSta
Ember.run(appController, 'setProperties', { alex: 'sriracha' });
});
-test("can opt into full transition by setting refreshModel in route queryParams when transitioning from child to parent", function() {
+QUnit.test("can opt into full transition by setting refreshModel in route queryParams when transitioning from child to parent", function() {
Ember.TEMPLATES.parent = compile('{{outlet}}');
Ember.TEMPLATES['parent/child'] = compile("{{link-to 'Parent' 'parent' (query-params foo='change') id='parent-link'}}");
@@ -715,7 +715,7 @@ test("can opt into full transition by setting refreshModel in route queryParams
equal(parentModelCount, 2);
});
-test("Use Ember.get to retrieve query params 'replace' configuration", function() {
+QUnit.test("Use Ember.get to retrieve query params 'replace' configuration", function() {
expect(2);
App.ApplicationController = Ember.Controller.extend({
queryParams: ['alex'],
@@ -740,7 +740,7 @@ test("Use Ember.get to retrieve query params 'replace' configuration", function(
setAndFlush(appController, 'alex', 'wallace');
});
-test("can override incoming QP values in setupController", function() {
+QUnit.test("can override incoming QP values in setupController", function() {
expect(3);
App.Router.map(function() {
@@ -771,7 +771,7 @@ test("can override incoming QP values in setupController", function() {
equal(router.get('location.path'), "/?omg=OVERRIDE");
});
-test("can override incoming QP array values in setupController", function() {
+QUnit.test("can override incoming QP array values in setupController", function() {
expect(3);
App.Router.map(function() {
@@ -802,7 +802,7 @@ test("can override incoming QP array values in setupController", function() {
equal(router.get('location.path'), "/?omg=" + encodeURIComponent(JSON.stringify(['OVERRIDE'])));
});
-test("URL transitions that remove QPs still register as QP changes", function() {
+QUnit.test("URL transitions that remove QPs still register as QP changes", function() {
expect(2);
App.IndexController = Ember.Controller.extend({
@@ -819,7 +819,7 @@ test("URL transitions that remove QPs still register as QP changes", function()
equal(indexController.get('omg'), 'lol');
});
-test("Subresource naming style is supported", function() {
+QUnit.test("Subresource naming style is supported", function() {
Router.map(function() {
this.resource('abc.def', { path: '/abcdef' }, function() {
@@ -850,7 +850,7 @@ test("Subresource naming style is supported", function() {
equal(router.get('location.path'), "/abcdef/zoo?bar=456&foo=123");
});
-test("transitionTo supports query params", function() {
+QUnit.test("transitionTo supports query params", function() {
App.IndexController = Ember.Controller.extend({
queryParams: ['foo'],
foo: 'lol'
@@ -870,7 +870,7 @@ test("transitionTo supports query params", function() {
equal(router.get('location.path'), "/?foo=false", "shorhand supported (bool)");
});
-test("transitionTo supports query params (multiple)", function() {
+QUnit.test("transitionTo supports query params (multiple)", function() {
App.IndexController = Ember.Controller.extend({
queryParams: ['foo', 'bar'],
foo: 'lol',
@@ -891,7 +891,7 @@ test("transitionTo supports query params (multiple)", function() {
equal(router.get('location.path'), "/?foo=false", "shorhand supported (bool)");
});
-test("setting controller QP to empty string doesn't generate null in URL", function() {
+QUnit.test("setting controller QP to empty string doesn't generate null in URL", function() {
expect(1);
App.IndexController = Ember.Controller.extend({
queryParams: ['foo'],
@@ -905,7 +905,7 @@ test("setting controller QP to empty string doesn't generate null in URL", funct
setAndFlush(controller, 'foo', '');
});
-test("A default boolean value deserializes QPs as booleans rather than strings", function() {
+QUnit.test("A default boolean value deserializes QPs as booleans rather than strings", function() {
App.IndexController = Ember.Controller.extend({
queryParams: ['foo'],
foo: false
@@ -927,7 +927,7 @@ test("A default boolean value deserializes QPs as booleans rather than strings",
equal(controller.get('foo'), false);
});
-test("Query param without value are empty string", function() {
+QUnit.test("Query param without value are empty string", function() {
App.IndexController = Ember.Controller.extend({
queryParams: ['foo'],
foo: ''
@@ -940,7 +940,7 @@ test("Query param without value are empty string", function() {
equal(controller.get('foo'), "");
});
-test("Array query params can be set", function() {
+QUnit.test("Array query params can be set", function() {
Router.map(function() {
this.route("home", { path: '/' });
});
@@ -962,7 +962,7 @@ test("Array query params can be set", function() {
equal(router.get('location.path'), "/?foo=%5B3%2C4%5D");
});
-test("(de)serialization: arrays", function() {
+QUnit.test("(de)serialization: arrays", function() {
App.IndexController = Ember.Controller.extend({
queryParams: ['foo'],
foo: [1]
@@ -980,7 +980,7 @@ test("(de)serialization: arrays", function() {
equal(router.get('location.path'), "/?foo=%5B%5D", "longform supported");
});
-test("Url with array query param sets controller property to array", function() {
+QUnit.test("Url with array query param sets controller property to array", function() {
App.IndexController = Ember.Controller.extend({
queryParams: ['foo'],
foo: ''
@@ -993,7 +993,7 @@ test("Url with array query param sets controller property to array", function()
deepEqual(controller.get('foo'), ["1","2","3"]);
});
-test("Array query params can be pushed/popped", function() {
+QUnit.test("Array query params can be pushed/popped", function() {
Router.map(function() {
this.route("home", { path: '/' });
});
@@ -1035,7 +1035,7 @@ test("Array query params can be pushed/popped", function() {
deepEqual(controller.foo, ['lol', 1]);
});
-test("Overwriting with array with same content shouldn't refire update", function() {
+QUnit.test("Overwriting with array with same content shouldn't refire update", function() {
expect(3);
var modelCount = 0;
@@ -1063,7 +1063,7 @@ test("Overwriting with array with same content shouldn't refire update", functio
equal(router.get('location.path'), "");
});
-test("Defaulting to params hash as the model should not result in that params object being watched", function() {
+QUnit.test("Defaulting to params hash as the model should not result in that params object being watched", function() {
expect(1);
Router.map(function() {
@@ -1091,7 +1091,7 @@ test("Defaulting to params hash as the model should not result in that params ob
Ember.run(router, 'transitionTo', 'other');
});
-test("A child of a resource route still defaults to parent route's model even if the child route has a query param", function() {
+QUnit.test("A child of a resource route still defaults to parent route's model even if the child route has a query param", function() {
expect(1);
App.IndexController = Ember.Controller.extend({
@@ -1113,7 +1113,7 @@ test("A child of a resource route still defaults to parent route's model even if
bootApplication();
});
-test("opting into replace does not affect transitions between routes", function() {
+QUnit.test("opting into replace does not affect transitions between routes", function() {
expect(5);
Ember.TEMPLATES.application = compile(
"{{link-to 'Foo' 'foo' id='foo-link'}}" +
@@ -1158,7 +1158,7 @@ test("opting into replace does not affect transitions between routes", function(
Ember.run(Ember.$('#bar-link'), 'click');
});
-test("Undefined isn't deserialized into a string", function() {
+QUnit.test("Undefined isn't deserialized into a string", function() {
expect(3);
Router.map(function() {
this.route("example");
@@ -1187,7 +1187,7 @@ test("Undefined isn't deserialized into a string", function() {
equal(get(controller, 'foo'), undefined);
});
-test("query params have been set by the time setupController is called", function() {
+QUnit.test("query params have been set by the time setupController is called", function() {
expect(1);
App.ApplicationController = Ember.Controller.extend({
@@ -1206,7 +1206,7 @@ test("query params have been set by the time setupController is called", functio
});
var testParamlessLinks = function(routeName) {
- test("param-less links in an app booted with query params in the URL don't reset the query params: " + routeName, function() {
+ QUnit.test("param-less links in an app booted with query params in the URL don't reset the query params: " + routeName, function() {
expect(1);
Ember.TEMPLATES[routeName] = compile("{{link-to 'index' 'index' id='index-link'}}");
@@ -1288,7 +1288,7 @@ QUnit.module("Model Dep Query Params", {
}
});
-test("query params have 'model' stickiness by default", function() {
+QUnit.test("query params have 'model' stickiness by default", function() {
this.boot();
Ember.run(this.$link1, 'click');
@@ -1310,7 +1310,7 @@ test("query params have 'model' stickiness by default", function() {
equal(this.$link3.attr('href'), '/a/a-3');
});
-test("query params have 'model' stickiness by default (url changes)", function() {
+QUnit.test("query params have 'model' stickiness by default (url changes)", function() {
this.boot();
@@ -1345,7 +1345,7 @@ test("query params have 'model' stickiness by default (url changes)", function()
});
-test("query params have 'model' stickiness by default (params-based transitions)", function() {
+QUnit.test("query params have 'model' stickiness by default (params-based transitions)", function() {
Ember.TEMPLATES.application = compile("{{#each a in articles}} {{link-to 'Article' 'article' a.id id=a.id}} {{/each}}");
this.boot();
@@ -1391,7 +1391,7 @@ test("query params have 'model' stickiness by default (params-based transitions)
equal(this.$link3.attr('href'), '/a/a-3?q=hay');
});
-test("'controller' stickiness shares QP state between models", function() {
+QUnit.test("'controller' stickiness shares QP state between models", function() {
App.ArticleController.reopen({
queryParams: { q: { scope: 'controller' } }
});
@@ -1435,7 +1435,7 @@ test("'controller' stickiness shares QP state between models", function() {
equal(this.$link3.attr('href'), '/a/a-3?q=woot&z=123');
});
-test("'model' stickiness is scoped to current or first dynamic parent route", function() {
+QUnit.test("'model' stickiness is scoped to current or first dynamic parent route", function() {
this.boot();
Ember.run(router, 'transitionTo', 'comments', 'a-1');
@@ -1459,7 +1459,7 @@ test("'model' stickiness is scoped to current or first dynamic parent route", fu
equal(router.get('location.path'), '/a/a-1/comments?page=3');
});
-test("can reset query params using the resetController hook", function() {
+QUnit.test("can reset query params using the resetController hook", function() {
App.Router.map(function() {
this.resource('article', { path: '/a/:id' }, function() {
this.resource('comments');
@@ -1504,7 +1504,7 @@ test("can reset query params using the resetController hook", function() {
equal(Ember.$('#two').attr('href'), "/a/a-2/comments");
});
-test("can unit test without bucket cache", function() {
+QUnit.test("can unit test without bucket cache", function() {
var controller = container.lookup('controller:article');
controller._bucketCache = null;
@@ -1533,7 +1533,7 @@ QUnit.module("Query Params - overlapping query param property names", {
}
});
-test("can remap same-named qp props", function() {
+QUnit.test("can remap same-named qp props", function() {
App.ParentController = Ember.Controller.extend({
queryParams: { page: 'parentPage' },
page: 1
@@ -1576,7 +1576,7 @@ test("can remap same-named qp props", function() {
equal(router.get('location.path'), '/parent/child');
});
-test("query params in the same route hierarchy with the same url key get auto-scoped", function() {
+QUnit.test("query params in the same route hierarchy with the same url key get auto-scoped", function() {
App.ParentController = Ember.Controller.extend({
queryParams: { foo: 'shared' },
foo: 1
@@ -1593,7 +1593,7 @@ test("query params in the same route hierarchy with the same url key get auto-sc
}, "You're not allowed to have more than one controller property map to the same query param key, but both `parent:foo` and `parent.child:bar` map to `shared`. You can fix this by mapping one of the controller properties to a different query param key via the `as` config option, e.g. `foo: { as: 'other-foo' }`");
});
-test("Support shared but overridable mixin pattern", function() {
+QUnit.test("Support shared but overridable mixin pattern", function() {
var HasPage = Ember.Mixin.create({
queryParams: 'page',
diff --git a/packages/ember/tests/routing/router_map_test.js b/packages/ember/tests/routing/router_map_test.js
index d770cd5d5ab..9d85612f1a5 100644
--- a/packages/ember/tests/routing/router_map_test.js
+++ b/packages/ember/tests/routing/router_map_test.js
@@ -51,7 +51,7 @@ QUnit.module("Router.map", {
}
});
-test("Router.map returns an Ember Router class", function () {
+QUnit.test("Router.map returns an Ember Router class", function () {
expect(1);
var ret = App.Router.map(function() {
@@ -61,7 +61,7 @@ test("Router.map returns an Ember Router class", function () {
ok(Ember.Router.detect(ret));
});
-test("Router.map can be called multiple times", function () {
+QUnit.test("Router.map can be called multiple times", function () {
expect(4);
Ember.TEMPLATES.hello = compile("Hello!");
diff --git a/packages/ember/tests/routing/substates_test.js b/packages/ember/tests/routing/substates_test.js
index c1d5d5e3834..27d1c81c605 100644
--- a/packages/ember/tests/routing/substates_test.js
+++ b/packages/ember/tests/routing/substates_test.js
@@ -72,7 +72,7 @@ QUnit.module("Loading/Error Substates", {
}
});
-test("Slow promise from a child route of application enters nested loading state", function() {
+QUnit.test("Slow promise from a child route of application enters nested loading state", function() {
var broModel = {};
var broDeferred = Ember.RSVP.defer();
@@ -103,7 +103,7 @@ test("Slow promise from a child route of application enters nested loading state
equal(Ember.$('#app', '#qunit-fixture').text(), "BRO", "bro template has loaded and replaced loading template");
});
-test("Slow promises waterfall on startup", function() {
+QUnit.test("Slow promises waterfall on startup", function() {
expect(7);
@@ -158,7 +158,7 @@ test("Slow promises waterfall on startup", function() {
equal(Ember.$('#app', '#qunit-fixture').text(), "GRANDMA MOM SALLY", "Sally template displayed");
});
-test("ApplicationRoute#currentPath reflects loading state path", function() {
+QUnit.test("ApplicationRoute#currentPath reflects loading state path", function() {
expect(4);
@@ -192,7 +192,7 @@ test("ApplicationRoute#currentPath reflects loading state path", function() {
equal(appController.get('currentPath'), "grandma.mom", "currentPath reflects final state");
});
-test("Slow promises returned from ApplicationRoute#model don't enter LoadingRoute", function() {
+QUnit.test("Slow promises returned from ApplicationRoute#model don't enter LoadingRoute", function() {
expect(2);
@@ -218,7 +218,7 @@ test("Slow promises returned from ApplicationRoute#model don't enter LoadingRout
equal(Ember.$('#app', '#qunit-fixture').text(), "INDEX");
});
-test("Don't enter loading route unless either route or template defined", function() {
+QUnit.test("Don't enter loading route unless either route or template defined", function() {
delete templates.loading;
@@ -243,7 +243,7 @@ test("Don't enter loading route unless either route or template defined", functi
equal(Ember.$('#app', '#qunit-fixture').text(), "INDEX");
});
-test("Enter loading route if only LoadingRoute defined", function() {
+QUnit.test("Enter loading route if only LoadingRoute defined", function() {
delete templates.loading;
@@ -273,7 +273,7 @@ test("Enter loading route if only LoadingRoute defined", function() {
equal(Ember.$('#app', '#qunit-fixture').text(), "INDEX");
});
-test("Enter child loading state of pivot route", function() {
+QUnit.test("Enter child loading state of pivot route", function() {
expect(4);
@@ -317,7 +317,7 @@ test("Enter child loading state of pivot route", function() {
equal(appController.get('currentPath'), "grandma.smells", "Finished transition");
});
-test("Loading actions bubble to root, but don't enter substates above pivot", function() {
+QUnit.test("Loading actions bubble to root, but don't enter substates above pivot", function() {
expect(6);
@@ -373,7 +373,7 @@ test("Loading actions bubble to root, but don't enter substates above pivot", fu
equal(appController.get('currentPath'), "grandma.smells", "Finished transition");
});
-test("Default error event moves into nested route", function() {
+QUnit.test("Default error event moves into nested route", function() {
expect(5);
@@ -418,7 +418,7 @@ test("Default error event moves into nested route", function() {
if (Ember.FEATURES.isEnabled("ember-routing-named-substates")) {
- test("Slow promises returned from ApplicationRoute#model enter ApplicationLoadingRoute if present", function() {
+ QUnit.test("Slow promises returned from ApplicationRoute#model enter ApplicationLoadingRoute if present", function() {
expect(2);
@@ -448,7 +448,7 @@ if (Ember.FEATURES.isEnabled("ember-routing-named-substates")) {
equal(Ember.$('#app', '#qunit-fixture').text(), "INDEX");
});
- test("Slow promises returned from ApplicationRoute#model enter application_loading if template present", function() {
+ QUnit.test("Slow promises returned from ApplicationRoute#model enter application_loading if template present", function() {
expect(3);
@@ -485,7 +485,7 @@ if (Ember.FEATURES.isEnabled("ember-routing-named-substates")) {
equal(Ember.$('#app', '#qunit-fixture').text(), "INDEX");
});
- test("Default error event moves into nested route, prioritizing more specifically named error route", function() {
+ QUnit.test("Default error event moves into nested route, prioritizing more specifically named error route", function() {
expect(5);
@@ -533,7 +533,7 @@ if (Ember.FEATURES.isEnabled("ember-routing-named-substates")) {
equal(appController.get('currentPath'), 'grandma.mom_error', "Initial route fully loaded");
});
- test("Prioritized substate entry works with preserved-namespace nested resources", function() {
+ QUnit.test("Prioritized substate entry works with preserved-namespace nested resources", function() {
expect(2);
@@ -568,7 +568,7 @@ if (Ember.FEATURES.isEnabled("ember-routing-named-substates")) {
equal(Ember.$('#app', '#qunit-fixture').text(), "YAY");
});
- test("Prioritized loading substate entry works with preserved-namespace nested routes", function() {
+ QUnit.test("Prioritized loading substate entry works with preserved-namespace nested routes", function() {
expect(2);
@@ -602,7 +602,7 @@ if (Ember.FEATURES.isEnabled("ember-routing-named-substates")) {
equal(Ember.$('#app', '#qunit-fixture').text(), "YAY");
});
- test("Prioritized error substate entry works with preserved-namespace nested routes", function() {
+ QUnit.test("Prioritized error substate entry works with preserved-namespace nested routes", function() {
expect(1);
@@ -633,7 +633,7 @@ if (Ember.FEATURES.isEnabled("ember-routing-named-substates")) {
equal(Ember.$('#app', '#qunit-fixture').text(), "FOOBAR ERROR: did it broke?", "foo.bar_error was entered (as opposed to something like foo/foo/bar_error)");
});
- test("Prioritized loading substate entry works with auto-generated index routes", function() {
+ QUnit.test("Prioritized loading substate entry works with auto-generated index routes", function() {
expect(2);
@@ -673,7 +673,7 @@ if (Ember.FEATURES.isEnabled("ember-routing-named-substates")) {
equal(Ember.$('#app', '#qunit-fixture').text(), "YAY");
});
- test("Prioritized error substate entry works with auto-generated index routes", function() {
+ QUnit.test("Prioritized error substate entry works with auto-generated index routes", function() {
expect(1);
@@ -710,7 +710,7 @@ if (Ember.FEATURES.isEnabled("ember-routing-named-substates")) {
equal(Ember.$('#app', '#qunit-fixture').text(), "FOO ERROR: did it broke?", "foo.index_error was entered");
});
- test("Rejected promises returned from ApplicationRoute transition into top-level application_error", function() {
+ QUnit.test("Rejected promises returned from ApplicationRoute transition into top-level application_error", function() {
expect(2);