1
0
Fork 0
mirror of synced 2024-06-02 02:25:17 +12:00
budibase/packages/backend-core/src/tests/utils.spec.js

13 lines
402 B
JavaScript
Raw Normal View History

2022-04-07 09:00:10 +12:00
const { structures } = require("./utilities")
2022-04-06 03:56:28 +12:00
const utils = require("../utils")
const events = require("../events")
describe("utils", () => {
describe("platformLogout", () => {
it("should call platform logout", async () => {
2022-04-07 09:00:10 +12:00
const ctx = structures.koa.newContext()
2022-04-06 03:56:28 +12:00
await utils.platformLogout({ ctx, userId: "test" })
2022-04-13 02:37:49 +12:00
expect(events.auth.logout).toBeCalledTimes(1)
2022-04-06 03:56:28 +12:00
})
})
})