UNPKG

464 BJavaScriptView Raw
1
2'use strict';
3
4const Crawler = require('../lib/crawler');
5const expect = require('chai').expect;
6const given = require('mocha-testdata');
7
8describe('Unsupported function test', function() {
9 given.async('onDrain','preRequest','cache')
10 .it('should throw exception when using unsupported options', function(done,key) {
11 const opt = {
12 maxConnections: 10
13 };
14
15 opt[key] = {};
16 expect(function(){Crawler(opt);}).to.throw(Error);
17 done();
18 });
19});