out-of-your-element/d2m/actions/register-user.test.js

25 lines
806 B
JavaScript
Raw Normal View History

2023-06-30 03:15:23 +00:00
const {channelToKState} = require("./create-room")
const {_memberToStateContent} = require("./register-user")
const {test} = require("supertape")
const testData = require("../../test/data")
test("member2state: general", async t => {
2023-07-07 07:28:23 +00:00
t.deepEqual(
await _memberToStateContent(testData.member.sheep.user, testData.member.sheep, testData.guild.general.id),
{
avatar_url: "mxc://cadence.moe/rfemHmAtcprjLEiPiEuzPhpl",
displayname: "The Expert's Submarine | aprilsong",
membership: "join",
"moe.cadence.ooye.member": {
avatar: "/guilds/112760669178241024/users/134826546694193153/avatars/38dd359aa12bcd52dd3164126c587f8c.png?size=1024"
},
"uk.half-shot.discord.member": {
bot: false,
displayColor: null,
id: "134826546694193153",
username: "@aprilsong"
}
}
)
2023-06-30 03:15:23 +00:00
})