DEV: Import EmberObject rather than global variable (#8256)

* DEV: Import ember/object rather than Ember.Object globally

* fixed broken object proxy import

* prettier on js

* added @ember/object/proxy to loader

* added unstaged file

* Fixed objet proxy reference is loader

* Linting!
This commit is contained in:
Mark VanLandingham
2019-10-29 14:23:50 -05:00
committed by GitHub
parent 74dc37c07c
commit c7475ee03b
81 changed files with 200 additions and 120 deletions

View File

@ -1,3 +1,4 @@
import EmberObject from "@ember/object";
import Topic from "discourse/models/topic";
import PostStream from "discourse/models/post-stream";
import { Placeholder } from "discourse/lib/posts-with-placeholders";
@ -191,7 +192,7 @@ QUnit.test("selectedPostsUsername", function(assert) {
});
QUnit.test("showSelectedPostsAtBottom", function(assert) {
const site = Ember.Object.create({ mobileView: false });
const site = EmberObject.create({ mobileView: false });
const model = Topic.create({ posts_count: 3 });
const controller = this.subject({ model, site });
@ -467,7 +468,7 @@ QUnit.test("togglePostSelection", function(assert) {
// });
QUnit.test("selectBelow", function(assert) {
const site = Ember.Object.create({
const site = EmberObject.create({
post_types: { small_action: 3, whisper: 4 }
});
@ -521,7 +522,7 @@ QUnit.test(
});
let destroyed;
const post = Ember.Object.create({
const post = EmberObject.create({
id: 2,
post_number: 2,
can_delete: true,
@ -532,12 +533,12 @@ QUnit.test(
}
});
const postStream = Ember.Object.create({
const postStream = EmberObject.create({
stream: [2, 3, 4],
posts: [post, { id: 3 }, { id: 4 }]
});
const currentUser = Ember.Object.create({ moderator: true });
const currentUser = EmberObject.create({ moderator: true });
const model = Topic.create({ postStream });
const controller = this.subject({ model, currentUser });