jobscraper/test/cwjobs.js

28 lines
697 B
JavaScript

/**
* Created by WebStorm.
* User: martin
* Date: 24/05/2020
* Time: 23:46
*/
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 CwjobsScraper = require('../scrapers/cwjobs');
const cwjobsScraper = new CwjobsScraper();
// const page = fs.readFileSync('data/indeed/indeed-2020-04-16--092311.html');
console.log(`${__dirname}`);
// const page = fs.readFileSync(`${__dirname}/data/totaljobs/totaljobs-2020-04-16--121504.html`);
test.test('Test CWJobs scraper', async t => {
await cwjobsScraper.go('london');
t.end();
});