Skip to content

Commit

Permalink
[intepreter][Canvas] Dedupe server functions in batched requests (ela…
Browse files Browse the repository at this point in the history
…stic#32712)

* [intepreter][Canvas] Dedupe server functions in batched requests

* Add and correct tests
  • Loading branch information
clintandrewhall committed Mar 10, 2019
1 parent 41b8931 commit 1292225
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/kbn-interpreter/src/public/interpreter.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,16 @@ describe('kbn-interpreter/interpreter', () => {
it('loads server-side functions', async () => {
const kfetch = jest.fn(async () => ({}));

<<<<<<< HEAD
await initializeInterpreter(kfetch, { toJS: () => ({}) }, ({ register: () => {} }));
=======
await initializeInterpreter({
kfetch,
ajaxStream,
typesRegistry: { toJS: () => ({}) },
functionsRegistry: { register: () => {} },
});
>>>>>>> 41e68ebbe9... [intepreter][Canvas] Dedupe server functions in batched requests (#32712)

expect(kfetch).toHaveBeenCalledTimes(1);
expect(kfetch).toHaveBeenCalledWith({ pathname: FUNCTIONS_URL });
Expand Down

0 comments on commit 1292225

Please sign in to comment.