1 | "use strict";
|
2 | let patents = require('../index.js').patents;
|
3 | let chai = require('chai');
|
4 | let chaiSubset = require('chai-subset');
|
5 | let assert = chai.assert;
|
6 | chai.use(chaiSubset);
|
7 |
|
8 | describe('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 |