Browse Source

tests: check that texts do not contain FIXME or TODO

mj-deploy
Vašek Šraier 4 years ago
parent
commit
8220e86423
  1. 4
      frontend/src/tests/grabber.test.ts

4
frontend/src/tests/grabber.test.ts

@ -30,6 +30,10 @@ describe('tasks.json validation', () => {
expect(["open-data", "text", "label"]).toContain(t.type) expect(["open-data", "text", "label"]).toContain(t.type)
if (t.type == "text") { if (t.type == "text") {
expect(t.htmlContent?.trim()).toBeTruthy() expect(t.htmlContent?.trim()).toBeTruthy()
if (!t.hidden) {
expect(t.htmlContent).not.toContain("FIXME")
expect(t.htmlContent).not.toContain("TODO")
}
} else if (t.type == "open-data") { } else if (t.type == "open-data") {
expect(t.taskReference).toBeTruthy() expect(t.taskReference).toBeTruthy()
expect(g.parseTaskId(t.taskReference)).toBeTruthy() expect(g.parseTaskId(t.taskReference)).toBeTruthy()