forked from cadence/out-of-your-element
only include necessary data for testing
This commit is contained in:
parent
e08262388b
commit
36adc30990
4 changed files with 114 additions and 9 deletions
|
@ -1,16 +1,22 @@
|
|||
// @ts-check
|
||||
|
||||
const fs = require("fs")
|
||||
const sqlite = require("better-sqlite3")
|
||||
const HeatSync = require("heatsync")
|
||||
|
||||
const config = require("../config")
|
||||
const passthrough = require("../passthrough")
|
||||
const db = new sqlite("db/ooye.db")
|
||||
const db = new sqlite(":memory:")
|
||||
|
||||
db.exec(fs.readFileSync("db/data-for-test.sql", "utf8"))
|
||||
|
||||
const sync = new HeatSync({watchFS: false})
|
||||
|
||||
Object.assign(passthrough, { config, sync, db })
|
||||
|
||||
const file = sync.require("../matrix/file")
|
||||
file._actuallyUploadDiscordFileToMxc = function(url, res) { throw new Error(`Not allowed to upload files during testing.\nURL: ${url}`) }
|
||||
|
||||
require("../matrix/kstate.test")
|
||||
require("../matrix/api.test")
|
||||
require("../matrix/read-registration.test")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue