Skip to content

Commit 28fae3d

Browse files
committed
One more test adjustment
1 parent 4811e51 commit 28fae3d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

x-pack/plugins/ingest_manager/server/routes/datasource/datasource_handlers.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,12 @@ describe('When calling datasource', () => {
245245

246246
describe('and a callback throws an exception', () => {
247247
const callbackThree: ExternalCallback[1] = jest.fn(async (ds) => {
248+
callbackCallingOrder.push('three');
248249
throw new Error('callbackThree threw error on purpose');
249250
});
250251

251252
const callbackFour: ExternalCallback[1] = jest.fn(async (ds) => {
253+
callbackCallingOrder.push('four');
252254
return {
253255
...ds,
254256
inputs: [
@@ -274,8 +276,7 @@ describe('When calling datasource', () => {
274276
const request = getCreateKibanaRequest();
275277
await routeHandler(context, request, response);
276278
expect(response.ok).toHaveBeenCalled();
277-
expect(callbackThree).toHaveBeenCalled();
278-
expect(callbackFour).toHaveBeenCalled();
279+
expect(callbackCallingOrder).toEqual(['one', 'two', 'three', 'four']);
279280
});
280281

281282
it('should log errors', async () => {

0 commit comments

Comments
 (0)