DEV: apply new coding standards (#10592)
This commit is contained in:
@@ -9,17 +9,17 @@ discourseModule("service:document-title", {
|
||||
},
|
||||
afterEach() {
|
||||
this.documentTitle.reset();
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
QUnit.test("it updates the document title", function(assert) {
|
||||
QUnit.test("it updates the document title", function (assert) {
|
||||
this.documentTitle.setTitle("Test Title");
|
||||
assert.equal(document.title, "Test Title", "title is correct");
|
||||
});
|
||||
|
||||
QUnit.test(
|
||||
"it doesn't display notification counts for anonymous users",
|
||||
function(assert) {
|
||||
function (assert) {
|
||||
this.documentTitle.setTitle("test notifications");
|
||||
this.documentTitle.updateNotificationCount(5);
|
||||
assert.equal(document.title, "test notifications");
|
||||
@@ -29,7 +29,7 @@ QUnit.test(
|
||||
}
|
||||
);
|
||||
|
||||
QUnit.test("it displays notification counts for logged in users", function(
|
||||
QUnit.test("it displays notification counts for logged in users", function (
|
||||
assert
|
||||
) {
|
||||
this.documentTitle.currentUser = currentUser();
|
||||
@@ -46,7 +46,7 @@ QUnit.test("it displays notification counts for logged in users", function(
|
||||
|
||||
QUnit.test(
|
||||
"it doesn't increment background context counts when focused",
|
||||
function(assert) {
|
||||
function (assert) {
|
||||
this.documentTitle.setTitle("background context");
|
||||
this.documentTitle.setFocus(true);
|
||||
this.documentTitle.incrementBackgroundContextCount();
|
||||
@@ -54,13 +54,14 @@ QUnit.test(
|
||||
}
|
||||
);
|
||||
|
||||
QUnit.test("it increments background context counts when not focused", function(
|
||||
assert
|
||||
) {
|
||||
this.documentTitle.setTitle("background context");
|
||||
this.documentTitle.setFocus(false);
|
||||
this.documentTitle.incrementBackgroundContextCount();
|
||||
assert.equal(document.title, "(1) background context");
|
||||
this.documentTitle.setFocus(true);
|
||||
assert.equal(document.title, "background context");
|
||||
});
|
||||
QUnit.test(
|
||||
"it increments background context counts when not focused",
|
||||
function (assert) {
|
||||
this.documentTitle.setTitle("background context");
|
||||
this.documentTitle.setFocus(false);
|
||||
this.documentTitle.incrementBackgroundContextCount();
|
||||
assert.equal(document.title, "(1) background context");
|
||||
this.documentTitle.setFocus(true);
|
||||
assert.equal(document.title, "background context");
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user