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

Upgraded to ember-cli 0.2.0, tests are qunit 2.0 compatible #330

Merged
merged 1 commit into from
Mar 23, 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
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ before_install:
- "npm config set spin false"
- "npm install -g npm@^2"


install:
- npm install -g bower
- npm install
Expand Down
3 changes: 0 additions & 3 deletions Brocfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ var dist = process.env.EMBER_DIST;
var options = {
fingerprint: {
enabled: false
},
vendorFiles: {
'handlebars.js': false
}
};

Expand Down
12 changes: 6 additions & 6 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"dependencies": {
"jquery": "^1.11.1",
"ember": "1.10.0",
"ember-resolver": "~0.1.11",
"loader.js": "ember-cli/loader.js#1.0.1",
"ember-resolver": "~0.1.12",
"loader.js": "ember-cli/loader.js#3.2.0",
"ember-cli-shims": "ember-cli/ember-cli-shims#0.0.3",
"ember-cli-test-loader": "ember-cli/ember-cli-test-loader#0.1.0",
"ember-cli-test-loader": "ember-cli-test-loader#0.1.3",
"ember-load-initializers": "ember-cli/ember-load-initializers#0.0.2",
"ember-qunit": "0.1.8",
"ember-qunit-notifications": "0.0.5",
"qunit": "~1.15.0",
"ember-qunit": "0.2.8",
"ember-qunit-notifications": "0.0.7",
"qunit": "~1.17.1",
"pikaday": "~1.2.0",
"moment": "~2.8.4"
}
Expand Down
37 changes: 17 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,44 +28,41 @@
"build:xpi": "npm run build:firefox && grunt build-xpi",
"build:xpi:production": "npm run build:firefox:production && grunt clean-tmp build-xpi"
},
"author": "Tilde, Inc.",
"license": "MIT",
"repository": "https://github.com/emberjs/ember-inspector",
"engines": {
"node": ">= 0.10.0",
"npm": ">= 2.0.0"
},
"author": "Tilde, Inc.",
"license": "MIT",
"devDependencies": {
"body-parser": "^1.2.0",
"broccoli-asset-rev": "^2.0.0",
"broccoli-concat": "0.0.12",
"broccoli-es6modules": "^0.5.1",
"broccoli-file-remover": "^0.3.1",
"broccoli-jshint": "^0.5.3",
"broccoli-merge-trees": "^0.2.1",
"broccoli-sass": "^0.6.1",
"broccoli-static-compiler": "^0.2.1",
"broccoli-wrap": "0.0.2",
"ember-cli": "0.1.12",
"ember-cli-6to5": "^3.0.0",
"ember-cli-app-version": "0.3.1",
"ember-cli": "0.2.0",
"ember-cli-app-version": "0.3.2",
"ember-cli-babel": "^4.0.0",
"ember-cli-content-security-policy": "0.3.0",
"ember-cli-dependency-checker": "0.0.7",
"ember-cli-htmlbars": "^0.6.0",
"ember-cli-dependency-checker": "0.0.8",
"ember-cli-htmlbars": "0.7.4",
"ember-cli-ic-ajax": "0.1.1",
"ember-cli-inject-live-reload": "^1.3.0",
"ember-cli-qunit": "0.3.1",
"ember-cli-qunit": "0.3.9",
"ember-cli-uglify": "1.0.1",
"ember-export-application-global": "^1.0.0",
"ember-export-application-global": "^1.0.2",
"ember-pikaday": "^0.2.1",
"express": "^4.8.5",
"glob": "^4.0.5",
"grunt": "^0.4.5",
"grunt-cli": "^0.1.13",
"grunt-contrib-compress": "^0.12.0",
"grunt-mozilla-addon-sdk": "~0.4.0",
"grunt-s3": "^0.2.0-alpha.3",
"grunt-version": "^0.3.0",
"broccoli-concat": "0.0.12",
"broccoli-es6modules": "^0.5.1",
"broccoli-file-remover": "^0.3.1",
"broccoli-jshint": "^0.5.3",
"broccoli-merge-trees": "^0.2.1",
"broccoli-wrap": "0.0.2",
"broccoli-sass": "^0.6.1",
"broccoli-static-compiler": "^0.2.1",
"list-view": "emberjs/list-view#aefb20f"
},
"ember-addon": {
Expand Down
23 changes: 0 additions & 23 deletions tests/.jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,8 @@
"setTimeout",
"$",
"-Promise",
"QUnit",
"define",
"console",
"equal",
"notEqual",
"notStrictEqual",
"test",
"asyncTest",
"testBoth",
"testWithDefault",
"raises",
"throws",
"deepEqual",
"start",
"stop",
"ok",
"strictEqual",
"module",
"moduleFor",
"moduleForComponent",
"moduleForModel",
"process",
"expect",
"visit",
"exists",
"fillIn",
Expand All @@ -39,8 +18,6 @@
"findWithAssert",
"wait",
"DS",
"isolatedContainer",
"startApp",
"andThen",
"currentURL",
"currentPath",
Expand Down
24 changes: 12 additions & 12 deletions tests/ember_debug/container_debug_test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { module, test } from 'qunit';
import Ember from "ember";
var emberA = Ember.A;

Expand All @@ -17,7 +18,7 @@ function setupApp(){
}

module("Container Debug", {
setup: function() {
beforeEach() {
/* globals require */
EmberDebug = require('ember-debug/main')["default"];
EmberDebug.Port = EmberDebug.Port.extend({
Expand All @@ -34,16 +35,15 @@ module("Container Debug", {
run(EmberDebug, 'start');
port = EmberDebug.port;
},
teardown: function() {
afterEach() {
name = null;
message = null;
EmberDebug.destroyContainer();
run(App, 'destroy');
}
});

test("#getTypes", function() {

test("#getTypes", function(assert) {
visit('/simple');

andThen(function() {
Expand All @@ -52,17 +52,17 @@ test("#getTypes", function() {
});

andThen(function() {
equal(name, 'container:types');
assert.equal(name, 'container:types');
var types = emberA(message.types);
var application = types.findBy('name', 'application');
ok(application);
equal(application.count, 1);
ok(types.findBy('name', 'controller'));
ok(types.findBy('name', 'route'));
assert.ok(application);
assert.equal(application.count, 1);
assert.ok(types.findBy('name', 'controller'));
assert.ok(types.findBy('name', 'route'));
});
});

test("#getInstances", function() {
test("#getInstances", function(assert) {
visit('/simple');

andThen(function() {
Expand All @@ -71,8 +71,8 @@ test("#getInstances", function() {
});

andThen(function() {
equal(name, 'container:instances');
assert.equal(name, 'container:instances');
var instances = emberA(message.instances);
ok(instances.findBy('name', 'simple'));
assert.ok(instances.findBy('name', 'simple'));
});
});
26 changes: 13 additions & 13 deletions tests/ember_debug/deprecation_debug_test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Ember from "ember";
import { module, test } from 'qunit';
/*globals require */
var EmberDebug = require("ember-debug/main")["default"];

Expand All @@ -14,7 +15,7 @@ function setupApp(){
}

module("Deprecation Debug", {
setup: function() {
beforeEach() {
EmberDebug.Port = EmberDebug.Port.extend({
init: function() {},
send: function(n, m) {
Expand All @@ -33,15 +34,15 @@ module("Deprecation Debug", {
emberCliConfig: null
});
},
teardown: function() {
afterEach() {
name = null;
message = null;
EmberDebug.destroyContainer();
Ember.run(App, 'destroy');
}
});

test("deprecations are caught and sent", function() {
test("deprecations are caught and sent", function(assert) {
var messages = [];
port.reopen({
send: function(name, message) {
Expand All @@ -63,20 +64,19 @@ test("deprecations are caught and sent", function() {
visit('/');
andThen(function() {
var deprecations = messages.findBy('name', 'deprecation:deprecationsAdded').message.deprecations;
equal(deprecations.length, 2);
assert.equal(deprecations.length, 2);
var deprecation = deprecations[0];
equal(deprecation.count, 2, 'Correctly combined');
equal(deprecation.message, 'Deprecation 1');
equal(deprecation.sources.length, 2, 'Correctly separated by source');
assert.equal(deprecation.count, 2, 'Correctly combined');
assert.equal(deprecation.message, 'Deprecation 1');
assert.equal(deprecation.sources.length, 2, 'Correctly separated by source');
deprecation = deprecations[1];
equal(deprecation.count, 1);
equal(deprecation.message, 'Deprecation 2');
equal(deprecation.sources.length, 1);
equal(deprecation.url, 'http://www.emberjs.com');
assert.equal(deprecation.count, 1);
assert.equal(deprecation.message, 'Deprecation 2');
assert.equal(deprecation.sources.length, 1);
assert.equal(deprecation.url, 'http://www.emberjs.com');

var count = messages.findBy('name', 'deprecation:count').message.count;
equal(count, 3, 'count correctly sent');
assert.equal(count, 3, 'count correctly sent');
});

});

23 changes: 12 additions & 11 deletions tests/ember_debug/ember_debug_test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Ember from "ember";
import { module, test } from 'qunit';

var EmberDebug;
var port, name, message;
Expand All @@ -11,7 +12,7 @@ function setupApp(){
}

module("Ember Debug", {
setup: function() {
beforeEach() {
/* globals require */
EmberDebug = require('ember-debug/main')["default"];
EmberDebug.Port = EmberDebug.Port.extend({
Expand All @@ -30,7 +31,7 @@ module("Ember Debug", {
EmberInspector = EmberDebug;
port = EmberDebug.port;
},
teardown: function() {
afterEach() {
name = null;
message = null;
EmberDebug.destroyContainer();
Expand All @@ -39,23 +40,23 @@ module("Ember Debug", {
});


function cantSend(obj) {
function cantSend(obj, assert) {
try {
EmberInspector.inspect(obj);
ok(false);
assert.ok(false);
} catch (e) {}
}

test("EmberInspector#inspect sends inspectable objects", function() {
test("EmberInspector#inspect sends inspectable objects", function(assert) {
var obj = Ember.Object.create();
EmberInspector.inspect(obj);
equal(name, "objectInspector:updateObject");
assert.equal(name, "objectInspector:updateObject");
name = null;
obj = [];
EmberInspector.inspect(obj);
equal(name, "objectInspector:updateObject");
cantSend(1);
cantSend({});
cantSend("a");
cantSend(null);
assert.equal(name, "objectInspector:updateObject");
cantSend(1, assert);
cantSend({}, assert);
cantSend("a", assert);
cantSend(null, assert);
});
Loading