[#62,faceting][s]: introduce Facet and FacetList models and use them.
* Conceptual breakthrough on how Faceting and Filtering interact (have updated issue #62 as a result).
This commit is contained in:
@@ -43,4 +43,11 @@ test('Dataset', function () {
|
||||
equal(out.fields.length, 2);
|
||||
});
|
||||
|
||||
test('Facet', function () {
|
||||
var facets = new recline.Model.FacetList();
|
||||
facets.addFacet('xyz');
|
||||
equal(1, facets.length);
|
||||
deepEqual({terms: {field: 'xyz'}}, facets.get('xyz').get('query'));
|
||||
});
|
||||
|
||||
})(this.jQuery);
|
||||
|
||||
Reference in New Issue
Block a user