UNPKG

ipbcrawler

Version:

Package to mine forum data using the Invision Power Board platform.

26 lines (20 loc) 598 B
const chai = require('chai') const postExtraction = require('./../extractions/post') const $ = require('./../utils/mock')('topic') /** * */ const topic = postExtraction($) /** * */ const { expect, assert } = chai describe('Topic page', () => { it("Found the main post", () => { expect(topic).to.have.all.keys('title', 'post', 'author') const { title, post, author } = topic assert.isString(title, 'Title topic is null') assert.isString(post, 'Main post is null') assert.isString(author, 'Topic author is null') }) })