import { ForumTest } from './forum.test-util.js'; describe('Forum', () => { const forumTest = new ForumTest(); before(async () => { await forumTest.setup(); }); context('Negative citation of a negative citation with max strength', async () => { it('Post1', async () => { const { forum, experts, posts } = forumTest; await forumTest.addPost(experts[0], 10); forum.getPost(posts[0]).value.should.equal(10); }); it('Post2 negatively cites Post1', async () => { const { forum, experts, posts } = forumTest; await forumTest.addPost(experts[0], 10, [{ postId: posts[0], weight: -1 }]); forum.getPost(posts[0]).value.should.equal(0); forum.getPost(posts[1]).value.should.equal(20); }); it('Post3 negatively cites Post2, restoring Post1 post to its initial value', async () => { const { forum, experts, posts } = forumTest; await forumTest.addPost(experts[0], 10, [{ postId: posts[1], weight: -1 }]); forum.getPost(posts[0]).value.should.equal(10); forum.getPost(posts[1]).value.should.equal(0); forum.getPost(posts[2]).value.should.equal(20); }); }); }); // await addPost(experts[0], 10); // await addPost(experts[0], 10, [{ postId: posts[3], weight: -1 }]); // await addPost(experts[0], 10, [{ postId: posts[4], weight: -1 }]); // await addPost(expert3, 'Post 4', 100, [{ postId: postId2, weight: -1 }]); // await addPost(expert1, 'Post 5', 100, [{ postId: postId3, weight: -1 }]);