fix: handle expired scheduled event links & fix test suite setup #73
1 changed files with 4 additions and 1 deletions
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.
commit
6553946b88
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue