/** * Created by WebStorm. * User: martin * Date: 22/05/2020 * Time: 21:01 */ /** * Created by WebStorm. * User: martin * Date: 22/05/2020 * Time: 12:18 */ const tape = require('tape'); const _test = require('tape-promise').default; // <---- notice 'default' const test = _test(tape); // decorate tape const fs = require('fs'); const cheerio = require('cheerio'); const RssS1Jobs = require('../scrapers/rss.s1jobs'); const s1jobsScraper = new RssS1Jobs(); const feed = fs.readFileSync('test/data/s1jobs/m7dp711z2r.xml'); test.test('Test Jobserve scraper', async t => { await s1jobsScraper.loadFeed(feed); s1jobsScraper.reduceItems(); await s1jobsScraper.filterAdverts(); await s1jobsScraper.addToDB(); t.end(); });