diff options
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/testdata/jupyter/integration_test.ipynb | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/cli/tests/testdata/jupyter/integration_test.ipynb b/cli/tests/testdata/jupyter/integration_test.ipynb index 76064cea2..450df4e9e 100644 --- a/cli/tests/testdata/jupyter/integration_test.ipynb +++ b/cli/tests/testdata/jupyter/integration_test.ipynb @@ -721,8 +721,47 @@ }, { "cell_type": "code", + "execution_count": 22, + "id": "6e9b530f-554d-4ef7-a5d6-69432283fd40", + "metadata": {}, + "outputs": [], + "source": [ + "// Smoke test: Send example Jupyter Widgets messages with \"extra\" context.\n", + "// No return because we don't have a front-end widget to get the message from.\n", + "await Deno.jupyter.broadcast(\n", + " \"comm_open\",\n", + " {\n", + " \"comm_id\": \"foo\",\n", + " \"target_name\": \"jupyter.widget\",\n", + " \"data\": {\n", + " \"state\": {},\n", + " },\n", + " },\n", + " {\n", + " \"metadata\": { \"version\": \"2.1.0\" },\n", + " },\n", + ");\n", + "\n", + "await Deno.jupyter.broadcast(\n", + " \"comm_msg\",\n", + " {\n", + " \"comm_id\": \"foo\",\n", + " \"data\": {\n", + " \"method\": \"update\",\n", + " \"state\": { \"answer\": null },\n", + " \"buffer_paths\": [[\"answer\"]]\n", + " },\n", + " },\n", + " {\n", + " \"buffers\": [new Uint8Array([42])],\n", + " },\n", + ");" + ] + }, + { + "cell_type": "code", "execution_count": null, - "id": "0181f28e", + "id": "f678313e-06c6-4fb8-a4ef-54a417129a82", "metadata": {}, "outputs": [], "source": [] |