mirror of
https://gitdab.com/cadence/out-of-your-element.git
synced 2025-09-10 04:12:50 +02:00
API endpoint for message info
This commit is contained in:
parent
7a59f48c0a
commit
bb711c26ac
5 changed files with 90 additions and 0 deletions
19
src/web/routes/info.test.js
Normal file
19
src/web/routes/info.test.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
// @ts-check
|
||||
|
||||
const assert = require("assert/strict")
|
||||
const tryToCatch = require("try-to-catch")
|
||||
const {router, test} = require("../../../test/web")
|
||||
|
||||
test("web info: 404 when message does not exist", async t => {
|
||||
const res = await router.test("get", "/api/message?message_id=1", {
|
||||
api: {
|
||||
async getEvent(roomID, eventID) {
|
||||
}
|
||||
}
|
||||
})
|
||||
t.fail("test not written")
|
||||
})
|
||||
|
||||
test("web info: returns data when message exists", async t => {
|
||||
t.fail("test not written")
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue