test: cover normal behavior and edge cases
GBB Demo authored on Nov 2, 2026
parent 4355c41commit 0bff561de8f0
2 files changed, +18 −0
- package.json+9 −0@@ -1,0 +1,9 @@1+{2+ "name": "launchpad-web",3+ "version": "0.1.0",4+ "private": true,5+ "type": "module",6+ "scripts": {7+ "test": "node test.mjs"8+ }9+}
- test.mjs+9 −0@@ -1,0 +1,9 @@1+import assert from "node:assert/strict";2+import * as app from "./app.mjs";3+4+assert.equal(app.completion([]), 0);5+assert.equal(app.completion([{done: true}, {done: false}]), 50);6+assert.deepEqual(app.visibleProjects([{name: "Launchpad"}], " LAUNCH "), [{name: "Launchpad"}]);7+assert.deepEqual(app.visibleProjects([{name: "Launchpad"}], "absent"), []);8+9+console.log("All checks passed");