1
0
Fork 0

force override server_origin during testing

This commit is contained in:
Cadence Ember 2023-09-12 21:37:36 +12:00
parent 714c31d230
commit 47b8d44010

View file

@ -8,6 +8,9 @@ const config = require("../config")
const passthrough = require("../passthrough") const passthrough = require("../passthrough")
const db = new sqlite(":memory:") const db = new sqlite(":memory:")
const reg = require("../matrix/read-registration")
reg.ooye.server_origin = "https://matrix.cadence.moe" // so that tests will pass even when hard-coded
db.exec(fs.readFileSync("db/ooye-schema.sql", "utf8")) db.exec(fs.readFileSync("db/ooye-schema.sql", "utf8"))
db.exec(fs.readFileSync("db/ooye-test-data.sql", "utf8")) db.exec(fs.readFileSync("db/ooye-test-data.sql", "utf8"))