import { mochaRun } from '../../../util/helpers.js'; import { ForumTest } from '../forum.test-util.js'; describe('Forum', function tests() { this.timeout(0); const forumTest = new ForumTest(); before(async () => { await forumTest.setup(); }); context('Initially zero-valued post later receives citations', async () => { let forum; let experts; let posts; before(() => { forum = forumTest.forum; experts = forumTest.experts; posts = forumTest.posts; }); it('Post1 has zero value', async () => { await forumTest.addPost(experts[0], 0); forum.getPost(posts[0]).value.should.equal(0); }); it('Post2 negatively cites Post1', async () => { 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(10); }); }); }); mochaRun();