DEV: migrate components tests to async/await

This commit is contained in:
Maja Komel
2018-07-24 20:12:09 +02:00
parent c0992a4d31
commit d16a2c776a
10 changed files with 619 additions and 615 deletions

View File

@ -26,25 +26,21 @@ componentTest("updating the content refreshes the list", {
this.set("pinned", true);
},
test(assert) {
andThen(() => {
assert.equal(
this.get("subject")
.header()
.name(),
"pinned"
);
});
async test(assert) {
assert.equal(
this.get("subject")
.header()
.name(),
"pinned"
);
andThen(() => this.set("pinned", false));
await this.set("pinned", false);
andThen(() => {
assert.equal(
this.get("subject")
.header()
.name(),
"unpinned"
);
});
assert.equal(
this.get("subject")
.header()
.name(),
"unpinned"
);
}
});