kentico-cloud-delivery
Version:
Official Kentico Cloud Delivery SDK
15 lines • 1.05 kB
JavaScript
import { TaxonomyMapper } from '../../../lib/mappers';
describe('TaxonomyMapper', function () {
var taxonomyMapper = new TaxonomyMapper();
it("should throw an Error when invalid response is given", function () {
expect(function () { return taxonomyMapper.mapTaxonomy(null, []); }).toThrowError();
expect(function () { return taxonomyMapper.mapTaxonomy(undefined, []); }).toThrowError();
expect(function () { return taxonomyMapper.mapTaxonomy({}, null); }).toThrowError();
expect(function () { return taxonomyMapper.mapTaxonomy({}, undefined); }).toThrowError();
expect(function () { return taxonomyMapper.mapTaxonomy({}, 'test'); }).toThrowError();
expect(function () { return taxonomyMapper.mapTaxonomies(null); }).toThrowError();
expect(function () { return taxonomyMapper.mapTaxonomies(undefined); }).toThrowError();
expect(function () { return taxonomyMapper.mapTaxonomies('test'); }).toThrowError();
});
});
//# sourceMappingURL=taxonomy-mapper.spec.js.map