UNPKG

kentico-cloud-delivery

Version:

Official Kentico Cloud Delivery SDK

30 lines 1.17 kB
"use strict"; exports.__esModule = true; var lib_1 = require("../../../lib"); var setup_1 = require("../../setup"); describe('Non generic item tests', function () { var context = new setup_1.Context(); // remove type resolvers for testing context.typeResolvers = []; setup_1.setup(context); var movieCodename = 'warrior'; var response; beforeAll(function (done) { context.deliveryClient.item(movieCodename) .getObservable() .subscribe(function (r) { response = r; done(); }); }); it("ContentItem should be returned if ", function () { expect(response.item).toEqual(jasmine.any(lib_1.ContentItem)); }); it("ContentItem should contain typed properties even though they are not defined as properties in class", function () { expect(response.item['title'].text.toLowerCase()).toEqual('warrior'); }); it("System attributes property should be set", function () { expect(response.item.system).toEqual(jasmine.any(lib_1.ContentItemSystemAttributes)); }); }); //# sourceMappingURL=non-generic-item.spec.js.map