diff --git a/packages/mountable/src/options.test.ts b/packages/mountable/src/options.test.ts index f91a763b4..50a4fe424 100644 --- a/packages/mountable/src/options.test.ts +++ b/packages/mountable/src/options.test.ts @@ -64,9 +64,7 @@ describe("canonicalizeMountOptions()", () => { }, requirements: [], archives: [], - onProgress: expect.any(Function), - onLoad: expect.any(Function), - onError: expect.any(Function), + ...makeToastKernelCallbacks(), }); }); @@ -98,9 +96,7 @@ describe("canonicalizeMountOptions()", () => { }, }, archives: [], - onProgress: expect.any(Function), - onLoad: expect.any(Function), - onError: expect.any(Function), + ...makeToastKernelCallbacks(), }); }); @@ -146,9 +142,7 @@ describe("canonicalizeMountOptions()", () => { options: {}, }, ], - onProgress: expect.any(Function), - onLoad: expect.any(Function), - onError: expect.any(Function), + ...makeToastKernelCallbacks(), }); }); @@ -169,9 +163,7 @@ describe("canonicalizeMountOptions()", () => { }, }, archives: [], - onProgress: expect.any(Function), - onLoad: expect.any(Function), - onError: expect.any(Function), + ...makeToastKernelCallbacks(), }); }); @@ -185,13 +177,11 @@ describe("canonicalizeMountOptions()", () => { entrypoint: "streamlit_app.py", files: {}, archives: [], - onProgress: expect.any(Function), - onLoad: expect.any(Function), - onError: expect.any(Function), + ...makeToastKernelCallbacks(), }); }); - it("wraps the `onError` option and also shows the original toast callback if `true` returned", () => { + it("wraps the `onError` option and also delegates to the original toast callback if `true` returned", () => { const toastCallbacks = makeToastKernelCallbacks(); const error = new Error("foo");