UNPKG

@thoughtspot/visual-embed-sdk

Version:
21 lines 775 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); require("jest-fetch-mock"); const sourceService_1 = require("./sourceService"); describe('Source service tests', () => { test('Should return source detail and cache it', async () => { fetchMock.mockResponseOnce(JSON.stringify({ data: { getSourceDetail: [{ Bla: { id: {}, }, }], }, })); await (0, sourceService_1.getSourceDetail)('https://tshost', 'id'); await (0, sourceService_1.getSourceDetail)('https://tshost', 'id'); expect(fetchMock).toBeCalledTimes(1); }); }); //# sourceMappingURL=sourceService.spec.js.map