UNPKG

kentico-cloud-delivery

Version:

Official Kentico Cloud Delivery SDK

17 lines 1.1 kB
"use strict"; exports.__esModule = true; var mappers_1 = require("../../../lib/mappers"); describe('TaxonomyMapper', function () { var taxonomyMapper = new mappers_1.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