remove publishedFromNow, its static so useless!

This commit is contained in:
Wouter Groeneveld 2021-03-25 20:57:49 +01:00
parent 782b1edd53
commit 7bdd377b43
2 changed files with 0 additions and 9 deletions

View File

@ -16,7 +16,6 @@ async function getWebmentions(domain) {
const json = JSON.parse(result.body).json
json.forEach(mention => {
mention.publishedFromNow = dayjs(mention.published).fromNow()
mention.relativeTarget = mention.target.substring(mention.target.indexOf(domain) + domain.length, mention.target.length)
})

View File

@ -21,14 +21,6 @@ describe("webmention receive serve-my-jam tests", () => {
expect(mention.target).toEqual("https://brainbaking.com/post/2021/02/my-retro-desktop-setup/")
})
test("getWebmentions enriches data with fromNow data", async () => {
const result = await getWebmentions(domain)
const mention = result[0]
expect(mention.published).toEqual("2021-03-08T18:35:24")
expect(mention.publishedFromNow).toEqual("3 days ago")
})
test("getWebmentions are sorted by published date descending", async() => {
const result = await getWebmentions(domain)