UNPKG

836 BJavaScriptView Raw
1"use strict";
2let patents = require('../index.js').patents;
3let chai = require('chai');
4let chaiSubset = require('chai-subset');
5let assert = chai.assert;
6chai.use(chaiSubset);
7
8describe('Patents', function() {
9 it('should return json with no args ', function(done) {
10 patents()
11 .then(function(data){
12 assert.containSubset(JSON.parse(data), {results: []});
13 done();
14
15 }).catch(done);
16
17 });
18
19 it('should return json with all args ', function(done) {
20 patents({
21 query: "temperature",
22 concept_tags: true,
23 limit: 10
24 })
25 .then(function(data){
26 assert.containSubset(JSON.parse(data), {results: []});
27 done();
28
29 }).catch(done);
30
31 });
32});
\No newline at end of file