Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
827 lines (822 loc) · 27.3 KB

File metadata and controls

827 lines (822 loc) · 27.3 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
/*
* Copyright 2014-2017 MarkLogic Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var should = require('should');
var fs = require('fs');
var testconfig = require('../etc/test-config.js');
var marklogic = require('../');
var q = marklogic.queryBuilder;
var db = marklogic.createDatabaseClient(testconfig.restReaderConnection);
var dbWriter = marklogic.createDatabaseClient(testconfig.restWriterConnection);
var restAdminDB = marklogic.createDatabaseClient(testconfig.restAdminConnection);
describe('document query', function(){
before(function(done){
this.timeout(5000);
// NOTE: must create a string range index on rangeKey1 and rangeKey2
dbWriter.documents.write({
uri: '/test/query/matchDir/doc1.json',
collections: ['matchCollection1'],
contentType: 'application/json',
content: {
id: 'matchDoc1',
valueKey: 'match value',
wordKey: 'matchWord1 unmatchWord2',
a1:{
skip:'skippedChild1',
a2:{
skip:'skippedChild2',
extractMatch:'extractedValue'
}
}
}
}, {
uri: '/test/query/unmatchDir/doc2.json',
collections: ['queryCollection0', 'queryCollection1'],
contentType: 'application/json',
content: {
id: 'unmatchDoc2',
valueKey: 'unmatch value',
wordKey: 'unmatchWord3'
}
}, {
uri: '/test/query/matchList/doc1.json',
collections: ['matchList'],
contentType: 'application/json',
content: {
id: 'matchList1',
rangeKey1: 'aa',
rangeKey2: 'ba',
scoreKey: 'unselectedWord unselectedWord unselectedWord unselectedWord',
point: '10.1, 10.1'
}
}, {
uri: '/test/query/matchList/doc2.json',
collections: ['matchList'],
contentType: 'application/json',
content: {
id: 'matchList2',
rangeKey1: 'ab',
rangeKey2: 'ba',
scoreKey: 'matchList unselectedWord unselectedWord unselectedWord',
point: '20.2, 20.2'
}
}, {
uri: '/test/query/matchList/doc3.json',
collections: ['matchList'],
contentType: 'application/json',
content: {
id: 'matchList3',
rangeKey1: 'aa',
rangeKey2: 'bb',
scoreKey: 'matchList matchList unselectedWord unselectedWord',
point: '30.3, 30.3'
}
}, {
uri: '/test/query/matchList/doc4.json',
collections: ['matchList'],
contentType: 'application/json',
content: {
id: 'matchList4',
rangeKey1: 'ab',
rangeKey2: 'bb',
scoreKey: 'matchList matchList matchList unselectedWord',
point: '40.4, 40.4'
}
}, {
uri: '/test/query/matchList/doc5.json',
collections: ['matchList'],
contentType: 'application/json',
content: {
id: 'matchList5',
rangeKey1: 'ac',
rangeKey2: 'bc',
scoreKey: 'matchList matchList matchList matchList matchList',
point: '50.5, 50.5'
}
}, {
uri: '/test/query/extraDir/doc1.xml',
collections: ['extraCollection'],
contentType: 'application/xml',
content: '<extraRoot><extraMatch>matchable extra</extraMatch></extraRoot>'
}).result().
then(function(response) {
var dbModule = 'extractFirst.xqy';
var fsPath = './test-basic/data/extractFirst.xqy';
restAdminDB.config.query.snippet.write(dbModule, fs.createReadStream(fsPath))
.result(function(response){done();})
.catch(done);
});
});
describe('for a built where clause', function() {
it('should match a directory query', function(done){
db.documents.query(
q.where(
q.directory('/test/query/matchDir/')
)
)
.result(function(response) {
response.length.should.equal(1);
var document = response[0];
document.should.be.ok;
document.uri.should.equal('/test/query/matchDir/doc1.json');
document.should.have.property('content');
document.content.id.should.equal('matchDoc1');
done();
})
.catch(done);
});
it('should match a collection query', function(done){
db.documents.query(
q.where(
q.collection('matchCollection1')
)
)
.result(function(response) {
response.length.should.equal(1);
var document = response[0];
document.should.be.ok;
document.uri.should.equal('/test/query/matchDir/doc1.json');
document.should.have.property('content');
document.content.id.should.equal('matchDoc1');
done();
})
.catch(done);
});
it('should match a value query', function(done){
db.documents.query(
q.where(
q.value('valueKey', 'match value')
)
)
.result(function(response) {
response.length.should.equal(1);
var document = response[0];
document.should.be.ok;
document.uri.should.equal('/test/query/matchDir/doc1.json');
document.should.have.property('content');
document.content.id.should.equal('matchDoc1');
done();
})
.catch(done);
});
it('should match a word query', function(done){
db.documents.query(
q.where(
q.word('wordKey', 'matchWord1')
)
)
.result(function(response) {
response.length.should.equal(1);
var document = response[0];
document.should.be.ok;
document.uri.should.equal('/test/query/matchDir/doc1.json');
document.should.have.property('content');
document.content.id.should.equal('matchDoc1');
done();
})
.catch(done);
});
it('should match all documents', function(done){
db.documents.query(
q.where(
q.trueQuery()
)
)
.result(function(response) {
response.length.should.aboveOrEqual(8);
var document = response[0];
document.should.be.ok;
done();
})
.catch(done);
});
it('should match no documents', function(done){
db.documents.query(
q.where(
q.falseQuery()
)
)
.result(function(response) {
response.length.should.equal(0);
done();
})
.catch(done);
});
it('should support an empty result set', function(done){
db.documents.query(
q.where(
q.word('wordKey', 'ThisCriteriaShouldNeverMatch')
)
)
.result(function(response) {
response.length.should.equal(0);
done();
})
.catch(done);
});
it('should calculate key1 and key2 facets without results', function(done){
db.documents.query(
q.where(
q.collection('matchList')
).
calculate(
q.facet('rangeKey1'),
q.facet('rangeKey2')).
slice(0, 0)
)
.result(function(response) {
response.length.should.equal(1);
response[0].should.have.property('facets');
response[0].facets.should.have.property('rangeKey1');
response[0].facets.rangeKey1.should.have.property('facetValues');
response[0].facets.rangeKey1.facetValues.length.should.equal(3);
response[0].facets.should.have.property('rangeKey2');
response[0].facets.rangeKey2.should.have.property('facetValues');
response[0].facets.rangeKey2.facetValues.length.should.equal(3);
done();
})
.catch(done);
});
it('should calculate key1 and key2 facets with ordered results', function(done){
db.documents.query(
q.where(
q.collection('matchList')
).
calculate(
q.facet('rangeKey1'),
q.facet('rangeKey2')).
orderBy('rangeKey1', 'rangeKey2')
)
.result(function(response) {
response.length.should.equal(6);
var order = [1, 3, 2, 4, 5];
for (var i=0; i <= order.length; i++) {
var document = response[i];
document.should.be.ok;
if (i === 0) {
document.should.have.property('facets');
document.facets.should.have.property('rangeKey1');
document.facets.rangeKey1.should.have.property('facetValues');
document.facets.rangeKey1.facetValues.length.should.equal(3);
document.facets.should.have.property('rangeKey2');
document.facets.rangeKey2.should.have.property('facetValues');
document.facets.rangeKey2.facetValues.length.should.equal(3);
} else {
document.should.have.property('content');
document.content.should.have.property('id');
document.content.id.should.equal('matchList'+order[i - 1]);
}
}
done();
})
.catch(done);
});
it('should calculate a geospatial facet', function(done){
db.documents.query(
q.where(
q.collection('matchList')
).
calculate(
q.facet('geo', q.geoProperty('point'),
q.heatmap(3, 3, q.southWestNorthEast(10, 10, 60, 60))
)
)
.slice(0, 0)
)
.result(function(response) {
response.length.should.equal(1);
response[0].should.have.property('facets');
response[0].facets.should.have.property('geo');
response[0].facets.geo.should.have.property('boxes');
response[0].facets.geo.boxes.length.should.equal(3);
response[0].facets.geo.boxes[0].count.should.equal(2);
response[0].facets.geo.boxes[1].count.should.equal(2);
response[0].facets.geo.boxes[2].count.should.equal(1);
done();
})
.catch(done);
});
it('should order by key1 and key2', function(done){
db.documents.query(
q.where(
q.collection('matchList')
).
orderBy('rangeKey1', 'rangeKey2')
)
.result(function(response) {
response.length.should.equal(5);
var order = [1, 3, 2, 4, 5];
for (var i=0; i < order.length; i++) {
var document = response[i];
document.should.be.ok;
document.should.have.property('content');
document.content.should.have.property('id');
document.content.id.should.equal('matchList'+order[i]);
}
done();
})
.catch(done);
});
it('should order by key2 and key1 descending', function(done){
db.documents.query(
q.where(
q.collection('matchList')
).
orderBy('rangeKey2', q.sort('rangeKey1', 'descending'))
)
.result(function(response) {
response.length.should.equal(5);
var order = [2, 1, 4, 3, 5];
for (var i=0; i < order.length; i++) {
var document = response[i];
document.should.be.ok;
document.should.have.property('content');
document.content.should.have.property('id');
document.content.id.should.equal('matchList'+order[i]);
}
done();
})
.catch(done);
});
it('should order by key1 and score', function(done){
db.documents.query(
q.where(
q.or(
q.collection('matchList'),
q.word('scoreKey', 'matchList')
)
).
orderBy('rangeKey1', q.sort(q.score(), 'descending'))
)
.result(function(response) {
response.length.should.equal(5);
var order = [3, 1, 4, 2, 5];
for (var i=0; i < order.length; i++) {
var document = response[i];
document.should.be.ok;
document.should.have.property('content');
document.content.should.have.property('id');
document.content.id.should.equal('matchList'+order[i]);
}
done();
})
.catch(done);
});
it('should order by key1 and a method for scoring', function(done){
db.documents.query(
q.where(
q.or(
q.collection('matchList'),
q.word('scoreKey', 'matchList')
)
).
orderBy('rangeKey1', q.sort(q.score('simple'), 'descending'))
)
.result(function(response) {
response.length.should.equal(5);
var order = [3, 1, 4, 2, 5];
for (var i=0; i < order.length; i++) {
var document = response[i];
document.should.be.ok;
document.should.have.property('content');
document.content.should.have.property('id');
document.content.id.should.equal('matchList'+order[i]);
}
done();
})
.catch(done);
});
it('should take a slice from the middle', function(done){
db.documents.query(
q.where(
q.word('scoreKey', 'matchList')
).
slice(1, 4)
)
.result(function(response) {
response.length.should.equal(3);
for (var i=0; i < 3; i++) {
var document = response[i];
document.should.be.ok;
document.should.have.property('content');
document.content.should.have.property('id');
document.content.id.should.equal('matchList'+(4 - i));
}
done();
})
.catch(done);
});
it('should take a slice from the end', function(done){
db.documents.query(
q.where(
q.word('scoreKey', 'matchList')
).
slice(2)
)
.result(function(response) {
response.length.should.equal(2);
for (var i=0; i < 2; i++) {
var document = response[i];
document.should.be.ok;
document.should.have.property('content');
document.content.should.have.property('id');
document.content.id.should.equal('matchList'+(3 - i));
}
done();
})
.catch(done);
});
it('should take a slice with extract', function(done){
db.documents.query(
q.where(
q.word('wordKey', 'matchWord1')
).
slice(0, 1, q.extract({
selected:'include-with-ancestors',
paths:'/node("a1")/node("a2")/node("extractMatch")'
}))
)
.result(function(response) {
response.length.should.equal(1);
var document = response[0];
document.should.have.property('content');
document.content.should.have.property('a1');
document.content.a1.should.have.property('a2');
document.content.a1.should.not.have.property('skippedChild1');
document.content.a1.a2.should.have.property('extractMatch');
document.content.a1.a2.should.not.have.property('skippedChild2');
done();
})
.catch(done);
});
it('should take a slice with a standard snippet', function(done){
db.documents.query(
q.where(
q.word('wordKey', 'matchWord1')
).
slice(0, 1, q.snippet()).
withOptions({categories: 'none'})
)
.result(function(response) {
response.length.should.equal(1);
response[0].results.length.should.equal(1);
response[0].results[0].should.have.property('matches');
response[0].results[0].matches.length.should.equal(1);
response[0].results[0].matches[0].should.have.property('match-text');
response[0].results[0].matches[0]['match-text'].length.should.equal(2);
response[0].results[0].matches[0]['match-text'][0].should.have.property('highlight');
response[0].results[0].matches[0]['match-text'][0].highlight.should.equal('matchWord1');
done();
})
.catch(done);
});
it('should take a slice with a snippet', function(done){
db.documents.query(
q.where(
q.word('wordKey', 'matchWord1')
).
slice(0, 1, q.snippet('extractFirst.xqy'))
)
.result(function(response) {
response.length.should.equal(2);
response[0].results.length.should.equal(1);
response[0].results[0].matches.should.have.property('first');
done();
})
.catch(done);
});
it('should get the query plan and permissions', function(done){
db.documents.query(
q.where(
q.collection('matchList')
).
withOptions({queryPlan:true, categories:'permissions'})
)
.result(function(response) {
response.length.should.equal(6);
// TODO: separate the diagnostics from the facets
for (var i=0; i < 6; i++) {
switch(i) {
case 0:
var summary = response[i];
summary.should.be.ok;
summary.should.have.property('plan');
break;
default:
var document = response[i];
document.should.be.ok;
document.should.have.property('permissions');
document.should.not.have.property('content');
}
}
done();
})
.catch(done);
});
});
describe('for a where clause with a parsed query', function() {
it('should match a value query', function(done){
db.documents.query(
q.where(
q.parsedFrom('matchConstraint:matchWord1',
q.parseBindings(
q.word('wordKey', q.bind('matchConstraint'))
))
)
)
.result(function(response) {
response.length.should.equal(1);
var document = response[0];
document.should.be.ok;
document.uri.should.equal('/test/query/matchDir/doc1.json');
document.should.have.property('content');
document.content.id.should.equal('matchDoc1');
done();
})
.catch(done);
});
it('should match an empty query', function(done){
db.documents.query(
q.where(
q.parsedFrom('',
q.parseBindings(
q.bindEmptyAs('no-results')
))
)
)
.result(function(response) {
response.length.should.equal(0);
done();
})
.catch(done);
});
});
describe('for a QBE where clause', function() {
it('should match a value query', function(done){
db.documents.query(
q.where(
q.byExample({
valueKey: 'match value'
})
)
)
.result(function(response) {
response.length.should.equal(1);
var document = response[0];
document.should.be.ok;
document.uri.should.equal('/test/query/matchDir/doc1.json');
document.should.have.property('content');
document.content.id.should.equal('matchDoc1');
done();
})
.catch(done);
});
it('should match a word query', function(done){
db.documents.query(
q.where(
q.byExample({
wordKey: {$word:'matchWord1'}
})
)
)
.result(function(response) {
response.length.should.equal(1);
var document = response[0];
document.should.be.ok;
document.uri.should.equal('/test/query/matchDir/doc1.json');
document.should.have.property('content');
document.content.id.should.equal('matchDoc1');
done();
})
.catch(done);
});
it('should work with calculate and orderBy clauses', function(done){
db.documents.query(
q.where(
q.byExample({$or:[
{rangeKey1: {$eq:'aa'}},
{rangeKey1: {$eq:'ab'}},
{rangeKey1: {$eq:'ac'}}
]})
).
calculate(
q.facet('rangeKey1'),
q.facet('rangeKey2')).
orderBy('rangeKey1', 'rangeKey2')
)
.result(function(response) {
response.length.should.equal(6);
var order = [1, 3, 2, 4, 5];
for (var i=0; i <= order.length; i++) {
var document = response[i];
document.should.be.ok;
if (i === 0) {
document.should.have.property('facets');
document.facets.should.have.property('rangeKey1');
document.facets.rangeKey1.should.have.property('facetValues');
document.facets.rangeKey1.facetValues.length.should.equal(3);
document.facets.should.have.property('rangeKey2');
document.facets.rangeKey2.should.have.property('facetValues');
document.facets.rangeKey2.facetValues.length.should.equal(3);
} else {
document.should.have.property('content');
document.content.should.have.property('id');
document.content.id.should.equal('matchList'+order[i - 1]);
}
}
done();
})
.catch(done);
});
it('should match an XML query', function(done){
db.documents.query(
q.where(
q.byExample(
'<q:qbe xmlns:q="http://marklogic.com/appservices/querybyexample">'+
'<q:format>json</q:format>'+
'<q:query>'+
'<valueKey>match value</valueKey>'+
'</q:query>'+
'</q:qbe>'
)
)
)
.result(function(response) {
response.length.should.equal(1);
var document = response[0];
document.should.be.ok;
document.uri.should.equal('/test/query/matchDir/doc1.json');
document.should.have.property('content');
document.content.id.should.equal('matchDoc1');
done();
})
.catch(done);
});
it('should match an XML document', function(done){
db.documents.query(
q.where(
q.byExample({
$query:{
extraMatch: 'matchable extra'
},
$format: 'xml'
})
)
)
.result(function(response) {
response.length.should.equal(1);
var document = response[0];
document.should.be.ok;
document.uri.should.equal('/test/query/extraDir/doc1.xml');
document.should.have.property('content');
done();
})
.catch(done);
});
it('should report an invalid query', function(done){
db.documents.query(
q.where(
q.byExample({
$query: {
$word:{key:'value'}
},
$validate: true
})
)
)
.result(function(response) {
response.should.have.property('invalid-query');
response['invalid-query'].should.have.property('report');
response['invalid-query'].report.should.have.property('id');
response['invalid-query'].report.id.should.equal('QBE-WORDOPERATOR');
response['invalid-query'].report.should.have.property('_value');
response['invalid-query'].report._value.should.equal(
'Substructure not allowed inside word operator'
);
done();
})
.catch(done);
});
});
describe('for a structured query', function() {
it('should work with a simple structured search', function(done) {
db.documents.query({
search: {
query: {
queries: [
{'directory-query':{uri:['/test/query/matchDir/']}}
]}
}
})
.result(function(response) {
response.length.should.equal(1);
var document = response[0];
document.should.be.ok;
document.uri.should.equal('/test/query/matchDir/doc1.json');
document.should.have.property('content');
document.content.id.should.equal('matchDoc1');
done();
})
.catch(done);
});
it('should work with combined search', function(done){
db.documents.query({
search: {
query: {
queries: [
{'or-query':{queries:[
{'range-query': {
'json-property': 'rangeKey1',
type: 'xs:string',
collation: 'http://marklogic.com/collation/',
value: 'aa',
'range-operator': 'EQ'
}},
{'range-query': {
'json-property': 'rangeKey1',
type: 'xs:string',
collation: 'http://marklogic.com/collation/',
value: 'ab',
'range-operator': 'EQ'
}},
{'range-query': {
'json-property': 'rangeKey1',
type: 'xs:string',
collation: 'http://marklogic.com/collation/',
value: 'ac',
'range-operator': 'EQ'
}}
]}}
]},
options: {
constraint: [
{name: 'rangeKey1',
range: {
'json-property': 'rangeKey1',
type: 'xs:string',
collation: 'http://marklogic.com/collation/',
facet: true
}
},
{name: 'rangeKey2',
range: {
'json-property': 'rangeKey2',
type: 'xs:string',
collation: 'http://marklogic.com/collation/',
facet: true
}
}
],
'sort-order': [
{direction: 'ascending',
'json-property': 'rangeKey1',
type: 'xs:string',
collation: 'http://marklogic.com/collation/'
},
{direction: 'ascending',
'json-property': 'rangeKey2',
type: 'xs:string',
collation: 'http://marklogic.com/collation/'
}],
'return-facets': true
}
}
})
.result(function(response) {
response.length.should.equal(6);
var order = [1, 3, 2, 4, 5];
for (var i=0; i <= order.length; i++) {
var document = response[i];
document.should.be.ok;
if (i === 0) {
document.should.have.property('facets');
document.facets.should.have.property('rangeKey1');
document.facets.rangeKey1.should.have.property('facetValues');
document.facets.rangeKey1.facetValues.length.should.equal(3);
document.facets.should.have.property('rangeKey2');
document.facets.rangeKey2.should.have.property('facetValues');
document.facets.rangeKey2.facetValues.length.should.equal(3);
} else {
document.should.have.property('content');
document.content.should.have.property('id');
document.content.id.should.equal('matchList'+order[i - 1]);
}
}
done();
})
.catch(done);
});
});
});
Morty Proxy This is a proxified and sanitized view of the page, visit original site.