mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 03:36:18 +08:00
Fix Prettier
This commit is contained in:
@ -126,8 +126,5 @@ QUnit.test("Group Requests", async assert => {
|
|||||||
.trim(),
|
.trim(),
|
||||||
"denied"
|
"denied"
|
||||||
);
|
);
|
||||||
assert.deepEqual(requests, [
|
assert.deepEqual(requests, [["19", "true"], ["20", undefined]]);
|
||||||
["19", "true"],
|
|
||||||
["20", undefined]
|
|
||||||
]);
|
|
||||||
});
|
});
|
||||||
|
@ -11,10 +11,7 @@ moduleForComponent("combo-box", {
|
|||||||
componentTest("default", {
|
componentTest("default", {
|
||||||
template: "{{combo-box content=items}}",
|
template: "{{combo-box content=items}}",
|
||||||
beforeEach() {
|
beforeEach() {
|
||||||
this.set("items", [
|
this.set("items", [{ id: 1, name: "hello" }, { id: 2, name: "world" }]);
|
||||||
{ id: 1, name: "hello" },
|
|
||||||
{ id: 2, name: "world" }
|
|
||||||
]);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
async test(assert) {
|
async test(assert) {
|
||||||
@ -46,10 +43,7 @@ componentTest("with valueAttribute", {
|
|||||||
componentTest("with nameProperty", {
|
componentTest("with nameProperty", {
|
||||||
template: '{{combo-box content=items nameProperty="text"}}',
|
template: '{{combo-box content=items nameProperty="text"}}',
|
||||||
beforeEach() {
|
beforeEach() {
|
||||||
this.set("items", [
|
this.set("items", [{ id: 0, text: "hello" }, { id: 1, text: "world" }]);
|
||||||
{ id: 0, text: "hello" },
|
|
||||||
{ id: 1, text: "world" }
|
|
||||||
]);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
async test(assert) {
|
async test(assert) {
|
||||||
|
@ -14,10 +14,7 @@ componentTest("with objects and values", {
|
|||||||
template: "{{multi-select content=items values=values}}",
|
template: "{{multi-select content=items values=values}}",
|
||||||
|
|
||||||
beforeEach() {
|
beforeEach() {
|
||||||
this.set("items", [
|
this.set("items", [{ id: 1, name: "hello" }, { id: 2, name: "world" }]);
|
||||||
{ id: 1, name: "hello" },
|
|
||||||
{ id: 2, name: "world" }
|
|
||||||
]);
|
|
||||||
this.set("values", [1, 2]);
|
this.set("values", [1, 2]);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -33,10 +33,7 @@ componentTest("accepts a value by reference", {
|
|||||||
|
|
||||||
beforeEach() {
|
beforeEach() {
|
||||||
this.set("value", 1);
|
this.set("value", 1);
|
||||||
this.set("content", [
|
this.set("content", [{ id: 1, name: "robin" }, { id: 2, name: "regis" }]);
|
||||||
{ id: 1, name: "robin" },
|
|
||||||
{ id: 2, name: "regis" }
|
|
||||||
]);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
async test(assert) {
|
async test(assert) {
|
||||||
@ -151,10 +148,7 @@ componentTest("dynamic headerText", {
|
|||||||
template: "{{single-select value=1 content=content}}",
|
template: "{{single-select value=1 content=content}}",
|
||||||
|
|
||||||
beforeEach() {
|
beforeEach() {
|
||||||
this.set("content", [
|
this.set("content", [{ id: 1, name: "robin" }, { id: 2, name: "regis" }]);
|
||||||
{ id: 1, name: "robin" },
|
|
||||||
{ id: 2, name: "regis" }
|
|
||||||
]);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
async test(assert) {
|
async test(assert) {
|
||||||
@ -252,10 +246,7 @@ componentTest("supports keyboard events", {
|
|||||||
template: "{{single-select content=content filterable=true}}",
|
template: "{{single-select content=content filterable=true}}",
|
||||||
|
|
||||||
beforeEach() {
|
beforeEach() {
|
||||||
this.set("content", [
|
this.set("content", [{ id: 1, name: "robin" }, { id: 2, name: "regis" }]);
|
||||||
{ id: 1, name: "robin" },
|
|
||||||
{ id: 2, name: "regis" }
|
|
||||||
]);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
skip: true,
|
skip: true,
|
||||||
|
@ -324,10 +324,7 @@ QUnit.test("canChangeOwner", function(assert) {
|
|||||||
this.registry.injection("controller", "currentUser", "current-user:main");
|
this.registry.injection("controller", "currentUser", "current-user:main");
|
||||||
|
|
||||||
const postStream = {
|
const postStream = {
|
||||||
posts: [
|
posts: [{ id: 1, username: "gary" }, { id: 2, username: "lili" }],
|
||||||
{ id: 1, username: "gary" },
|
|
||||||
{ id: 2, username: "lili" }
|
|
||||||
],
|
|
||||||
stream: [1, 2]
|
stream: [1, 2]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -141,11 +141,7 @@ QUnit.test("closestPostNumberFor", assert => {
|
|||||||
|
|
||||||
QUnit.test("closestDaysAgoFor", assert => {
|
QUnit.test("closestDaysAgoFor", assert => {
|
||||||
const postStream = buildStream(1231);
|
const postStream = buildStream(1231);
|
||||||
postStream.set("timelineLookup", [
|
postStream.set("timelineLookup", [[1, 10], [3, 8], [5, 1]]);
|
||||||
[1, 10],
|
|
||||||
[3, 8],
|
|
||||||
[5, 1]
|
|
||||||
]);
|
|
||||||
|
|
||||||
assert.equal(postStream.closestDaysAgoFor(1), 10);
|
assert.equal(postStream.closestDaysAgoFor(1), 10);
|
||||||
assert.equal(postStream.closestDaysAgoFor(2), 10);
|
assert.equal(postStream.closestDaysAgoFor(2), 10);
|
||||||
|
Reference in New Issue
Block a user