jam-my-stack/test/webmention/send.test.js

22 lines
434 B
JavaScript
Raw Normal View History

2021-03-17 22:15:43 +01:00
describe("webmention send serve-my-jam tests", () => {
const got = require('got')
const { sendWebmentions } = require('./../../src/webmention/send')
let calledPut = ""
2021-03-17 22:15:43 +01:00
beforeEach(() => {
got.put = function(url) {
calledPut = url
2021-03-17 22:15:43 +01:00
}
});
test("sendWebmentions", async() => {
await sendWebmentions('brainbaking.com')
expect(calledPut).toBe("https://jam.brainbaking.com/webmention/brainbaking.com/miauwkes")
2021-03-17 22:15:43 +01:00
})
})