fix: handle expired scheduled event links & fix test suite setup #73

Merged
cadence merged 3 commits from beanie/out-of-your-element:bugfix/handle-expired-events into main 2026-03-08 22:11:29 +00:00
Showing only changes of commit 6553946b88 - Show all commits

test: fix null registration object and validation errors during setup

Running the test suite without a local `registration.yaml` previously
caused a TypeError because the `reg` export defaulted to null. This
injects a base template using `getTemplateRegistration` before applying
test-specific overrides.
Bea 2026-03-02 02:39:23 +00:00
Signed by untrusted user: beanie
GPG key ID: ADACB518055DDC3B

View file

@ -13,7 +13,10 @@ const {green} = require("ansi-colors")
const passthrough = require("../src/passthrough")
const db = new sqlite(":memory:")
const {reg} = require("../src/matrix/read-registration")
const readReg = require("../src/matrix/read-registration")
readReg.reg = readReg.getTemplateRegistration("cadence.moe")
const {reg} = readReg
reg.url = "http://localhost:6693"
reg.ooye.discord_token = "Njg0MjgwMTkyNTUzODQ0NzQ3.Xl3zlw.baby"
reg.ooye.server_origin = "https://matrix.cadence.moe" // so that tests will pass even when hard-coded
reg.ooye.server_name = "cadence.moe"