/** * Created by WebStorm. * User: martin * Date: 15/04/2020 * Time: 11:56 */ 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 IndeedScraper = require('../scrapers/indeed'); const TotaljobsScraper = require('../scrapers/totaljobs'); const CwjobsScraper = require('../scrapers/cwjobs'); const indeedScraper = new IndeedScraper(); const totaljobsScraper = new TotaljobsScraper(); const cwjobsScraper = new CwjobsScraper(); test.test('Test Indeed scraper', async t => { await indeedScraper.go('london'); await totaljobsScraper.go('london'); await cwjobsScraper.go('london'); await indeedScraper.go('glasgow'); await totaljobsScraper.go('glasgow'); await cwjobsScraper.go('glasgow'); await indeedScraper.go('edinburgh'); await totaljobsScraper.go('edinburgh'); await cwjobsScraper.go('edinburgh'); await indeedScraper.go('milton keynes'); await totaljobsScraper.go('milton keynes'); await cwjobsScraper.go('milton keynes'); t.end(); });