Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to QUnit 1.17.1. #10345

Merged
merged 2 commits into from
Feb 3, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
"equal",
"notEqual",
"notStrictEqual",
"test",
"asyncTest",
"raises",
"throws",
"deepEqual",
"ok",
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "ember",
"dependencies": {
"jquery": "~1.11.1",
"qunit": "~1.12.0",
"qunit": "~1.17.1",
"qunit-phantom-runner": "jonkemp/qunit-phantomjs-runner#1.2.0"
},
"devDependencies": {
Expand Down
60 changes: 30 additions & 30 deletions packages/container/tests/container_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ QUnit.module("Container", {
}
});

test("A registered factory returns the same instance each time", function() {
QUnit.test("A registered factory returns the same instance each time", function() {
var registry = new Registry();
var container = registry.container();
var PostController = factory();
Expand All @@ -29,7 +29,7 @@ test("A registered factory returns the same instance each time", function() {
equal(postController, container.lookup('controller:post'));
});

test("A registered factory is returned from lookupFactory", function() {
QUnit.test("A registered factory is returned from lookupFactory", function() {
var registry = new Registry();
var container = registry.container();
var PostController = factory();
Expand All @@ -42,7 +42,7 @@ test("A registered factory is returned from lookupFactory", function() {
ok(PostControllerFactory.create() instanceof PostController, "The return of factory.create is an instance of PostController");
});

test("A registered factory is returned from lookupFactory is the same factory each time", function() {
QUnit.test("A registered factory is returned from lookupFactory is the same factory each time", function() {
var registry = new Registry();
var container = registry.container();
var PostController = factory();
Expand All @@ -52,7 +52,7 @@ test("A registered factory is returned from lookupFactory is the same factory ea
deepEqual(container.lookupFactory('controller:post'), container.lookupFactory('controller:post'), 'The return of lookupFactory is always the same');
});

test("A factory returned from lookupFactory has a debugkey", function() {
QUnit.test("A factory returned from lookupFactory has a debugkey", function() {
var registry = new Registry();
var container = registry.container();
var PostController = factory();
Expand All @@ -64,7 +64,7 @@ test("A factory returned from lookupFactory has a debugkey", function() {
equal(PostFactory._debugContainerKey, 'controller:post', 'factory instance receives _debugContainerKey');
});

test("fallback for to create time injections if factory has no extend", function() {
QUnit.test("fallback for to create time injections if factory has no extend", function() {
var registry = new Registry();
var container = registry.container();
var AppleController = factory();
Expand All @@ -84,7 +84,7 @@ test("fallback for to create time injections if factory has no extend", function
ok(postController.apple instanceof AppleController, 'instance receives an apple of instance AppleController');
});

test("The descendants of a factory returned from lookupFactory have a container and debugkey", function() {
QUnit.test("The descendants of a factory returned from lookupFactory have a container and debugkey", function() {
var registry = new Registry();
var container = registry.container();
var PostController = factory();
Expand All @@ -99,7 +99,7 @@ test("The descendants of a factory returned from lookupFactory have a container
ok(instance instanceof PostController, 'factory instance is instance of factory');
});

test("A registered factory returns a fresh instance if singleton: false is passed as an option", function() {
QUnit.test("A registered factory returns a fresh instance if singleton: false is passed as an option", function() {
var registry = new Registry();
var container = registry.container();
var PostController = factory();
Expand All @@ -122,7 +122,7 @@ test("A registered factory returns a fresh instance if singleton: false is passe
ok(postController4 instanceof PostController, "All instances are instances of the registered factory");
});

test("A container lookup has access to the container", function() {
QUnit.test("A container lookup has access to the container", function() {
var registry = new Registry();
var container = registry.container();
var PostController = factory();
Expand All @@ -134,7 +134,7 @@ test("A container lookup has access to the container", function() {
equal(postController.container, container);
});

test("A factory type with a registered injection's instances receive that injection", function() {
QUnit.test("A factory type with a registered injection's instances receive that injection", function() {
var registry = new Registry();
var container = registry.container();
var PostController = factory();
Expand All @@ -151,7 +151,7 @@ test("A factory type with a registered injection's instances receive that inject
equal(postController.store, store);
});

test("An individual factory with a registered injection receives the injection", function() {
QUnit.test("An individual factory with a registered injection receives the injection", function() {
var registry = new Registry();
var container = registry.container();
var PostController = factory();
Expand All @@ -173,7 +173,7 @@ test("An individual factory with a registered injection receives the injection",
equal(postController.store, store, 'has the correct store injected');
});

test("A factory with both type and individual injections", function() {
QUnit.test("A factory with both type and individual injections", function() {
var registry = new Registry();
var container = registry.container();
var PostController = factory();
Expand All @@ -195,7 +195,7 @@ test("A factory with both type and individual injections", function() {
equal(postController.router, router);
});

test("A factory with both type and individual factoryInjections", function() {
QUnit.test("A factory with both type and individual factoryInjections", function() {
var registry = new Registry();
var container = registry.container();
var PostController = factory();
Expand All @@ -217,7 +217,7 @@ test("A factory with both type and individual factoryInjections", function() {
equal(PostControllerFactory.router, router, 'PostControllerFactory has the route instance');
});

test("A non-singleton instance is never cached", function() {
QUnit.test("A non-singleton instance is never cached", function() {
var registry = new Registry();
var container = registry.container();
var PostView = factory();
Expand All @@ -230,7 +230,7 @@ test("A non-singleton instance is never cached", function() {
ok(postView1 !== postView2, "Non-singletons are not cached");
});

test("A non-instantiated property is not instantiated", function() {
QUnit.test("A non-instantiated property is not instantiated", function() {
var registry = new Registry();
var container = registry.container();

Expand All @@ -239,14 +239,14 @@ test("A non-instantiated property is not instantiated", function() {
equal(container.lookup('template:foo'), template);
});

test("A failed lookup returns undefined", function() {
QUnit.test("A failed lookup returns undefined", function() {
var registry = new Registry();
var container = registry.container();

equal(container.lookup('doesnot:exist'), undefined);
});

test("An invalid factory throws an error", function() {
QUnit.test("An invalid factory throws an error", function() {
var registry = new Registry();
var container = registry.container();

Expand All @@ -257,7 +257,7 @@ test("An invalid factory throws an error", function() {
}, /Failed to create an instance of \'controller:foo\'/);
});

test("Injecting a failed lookup raises an error", function() {
QUnit.test("Injecting a failed lookup raises an error", function() {
Ember.MODEL_FACTORY_INJECTIONS = true;

var registry = new Registry();
Expand All @@ -279,7 +279,7 @@ test("Injecting a failed lookup raises an error", function() {
});
});

test("Injecting a falsy value does not raise an error", function() {
QUnit.test("Injecting a falsy value does not raise an error", function() {
var registry = new Registry();
var container = registry.container();
var ApplicationController = factory();
Expand All @@ -291,7 +291,7 @@ test("Injecting a falsy value does not raise an error", function() {
equal(container.lookup('controller:application').currentUser, null);
});

test("Destroying the container destroys any cached singletons", function() {
QUnit.test("Destroying the container destroys any cached singletons", function() {
var registry = new Registry();
var container = registry.container();
var PostController = factory();
Expand All @@ -315,7 +315,7 @@ test("Destroying the container destroys any cached singletons", function() {
ok(!postView.isDestroyed, "Non-singletons are not destroyed");
});

test("The container can use a registry hook to resolve factories lazily", function() {
QUnit.test("The container can use a registry hook to resolve factories lazily", function() {
var registry = new Registry();
var container = registry.container();
var PostController = factory();
Expand All @@ -331,7 +331,7 @@ test("The container can use a registry hook to resolve factories lazily", functi
ok(postController instanceof PostController, "The correct factory was provided");
});

test("The container normalizes names before resolving", function() {
QUnit.test("The container normalizes names before resolving", function() {
var registry = new Registry();
var container = registry.container();
var PostController = factory();
Expand All @@ -346,7 +346,7 @@ test("The container normalizes names before resolving", function() {
ok(postController instanceof PostController, "Normalizes the name before resolving");
});

test("The container normalizes names when looking factory up", function() {
QUnit.test("The container normalizes names when looking factory up", function() {
var registry = new Registry();
var container = registry.container();
var PostController = factory();
Expand All @@ -361,7 +361,7 @@ test("The container normalizes names when looking factory up", function() {
equal(fact.toString() === PostController.extend().toString(), true, "Normalizes the name when looking factory up");
});

test("The container can get options that should be applied to a given factory", function() {
QUnit.test("The container can get options that should be applied to a given factory", function() {
var registry = new Registry();
var container = registry.container();
var PostView = factory();
Expand All @@ -383,7 +383,7 @@ test("The container can get options that should be applied to a given factory",
ok(postView1 !== postView2, "The two lookups are different");
});

test("The container can get options that should be applied to all factories for a given type", function() {
QUnit.test("The container can get options that should be applied to all factories for a given type", function() {
var registry = new Registry();
var container = registry.container();
var PostView = factory();
Expand All @@ -405,7 +405,7 @@ test("The container can get options that should be applied to all factories for
ok(postView1 !== postView2, "The two lookups are different");
});

test("factory resolves are cached", function() {
QUnit.test("factory resolves are cached", function() {
var registry = new Registry();
var container = registry.container();
var PostController = factory();
Expand All @@ -423,7 +423,7 @@ test("factory resolves are cached", function() {
deepEqual(resolveWasCalled, ['controller:post']);
});

test("factory for non extendables (MODEL) resolves are cached", function() {
QUnit.test("factory for non extendables (MODEL) resolves are cached", function() {
var registry = new Registry();
var container = registry.container();
var PostController = factory();
Expand All @@ -441,7 +441,7 @@ test("factory for non extendables (MODEL) resolves are cached", function() {
deepEqual(resolveWasCalled, ['model:post']);
});

test("factory for non extendables resolves are cached", function() {
QUnit.test("factory for non extendables resolves are cached", function() {
var registry = new Registry();
var container = registry.container();
var PostController = {};
Expand All @@ -461,7 +461,7 @@ test("factory for non extendables resolves are cached", function() {
});

if (Ember.FEATURES.isEnabled('ember-metal-injected-properties')) {
test("The `_onLookup` hook is called on factories when looked up the first time", function() {
QUnit.test("The `_onLookup` hook is called on factories when looked up the first time", function() {
expect(2);

var registry = new Registry();
Expand All @@ -481,7 +481,7 @@ if (Ember.FEATURES.isEnabled('ember-metal-injected-properties')) {
container.lookupFactory('apple:main');
});

test("A factory's lazy injections are validated when first instantiated", function() {
QUnit.test("A factory's lazy injections are validated when first instantiated", function() {
var registry = new Registry();
var container = registry.container();
var Apple = factory();
Expand All @@ -501,7 +501,7 @@ if (Ember.FEATURES.isEnabled('ember-metal-injected-properties')) {
}, /Attempting to inject an unknown injection: `banana:main`/);
});

test("Lazy injection validations are cached", function() {
QUnit.test("Lazy injection validations are cached", function() {
expect(1);

var registry = new Registry();
Expand Down
Loading