From 5c46a91c555c64265dd69eb2527ced2a4aadb1bf Mon Sep 17 00:00:00 2001 From: Justin Nguyen Date: Sat, 11 Nov 2023 15:33:13 -0800 Subject: [PATCH] add first test --- lib/__tests__/account.jest.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/__tests__/account.jest.js b/lib/__tests__/account.jest.js index c33a4c8..e4fb746 100644 --- a/lib/__tests__/account.jest.js +++ b/lib/__tests__/account.jest.js @@ -1,7 +1,14 @@ -const account = require('../account'); +const { isMyPost } = require('../account'); import 'node-fetch'; jest.mock('node-fetch', () => jest.fn()); -test('Check if a post is my post', () => {}); +test('Check if a post is my post', () => { + const { DOMAIN } = process.env; + const activity = { + id: `https://${DOMAIN}/m/` + }; + + expect(isMyPost(activity)).toBe(true); +});