@@ -58,6 +58,7 @@ const {
|
||||
anchorsFromHTML,
|
||||
statusOf,
|
||||
kindOf,
|
||||
finishedLabel,
|
||||
} = require("../manga-bookmark.user.js");
|
||||
|
||||
// detect() reads only these four properties off location.
|
||||
@@ -397,6 +398,18 @@ test("statusOf defaults a missing status to reading", () => {
|
||||
assert.equal(statusOf({ status: "archived" }), "archived");
|
||||
});
|
||||
|
||||
// ============================================================
|
||||
// finishedLabel — finished is a fact about the Series (issue #157), which is
|
||||
// the server's business; the panel only names it. The label is text through
|
||||
// the el() helper, never markup.
|
||||
// ============================================================
|
||||
|
||||
test("finishedLabel names a finished series and nothing else", () => {
|
||||
assert.equal(finishedLabel({ finished: true }), "Finished");
|
||||
assert.equal(finishedLabel({ finished: false }), "");
|
||||
assert.equal(finishedLabel({}), "");
|
||||
});
|
||||
|
||||
// ============================================================
|
||||
// kindOf — a row written before the kind column existed has none, and every
|
||||
// one of those is manga.
|
||||
|
||||
Reference in New Issue
Block a user