diff options
author | Don Jayamanne <don.jayamanne@outlook.com> | 2024-03-27 05:48:23 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-26 18:48:23 +0000 |
commit | 9841d3fdf1f8eebb318a9e37a10ebc903d104782 (patch) | |
tree | cd41f4cf2312beb34f12947563979459a1ed040b /tests/integration/jupyter_tests.rs | |
parent | a2a537e196360c5e44821f3bff901bd478ab8156 (diff) |
fix(kernel): Do not increase counter if store_history=false (#20848)
Fixes https://github.com/denoland/deno/issues/20847
Co-authored-by: Nathan Whitaker <nathan@deno.com>
Diffstat (limited to 'tests/integration/jupyter_tests.rs')
-rw-r--r-- | tests/integration/jupyter_tests.rs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/integration/jupyter_tests.rs b/tests/integration/jupyter_tests.rs index 29636f305..02695c595 100644 --- a/tests/integration/jupyter_tests.rs +++ b/tests/integration/jupyter_tests.rs @@ -533,3 +533,31 @@ async fn jupyter_execute_request() -> Result<()> { Ok(()) } + +#[tokio::test] +async fn jupyter_store_history_false() -> Result<()> { + let (_ctx, client, _process) = setup().await; + client + .send( + Shell, + "execute_request", + json!({ + "silent": false, + "store_history": false, + "code": "console.log(\"asdf\")" + }), + ) + .await?; + + let reply = client.recv(Shell).await?; + assert_eq!(reply.header.msg_type, "execute_reply"); + assert_eq_subset( + reply.content, + json!({ + "status": "ok", + "execution_count": 0, + }), + ); + + Ok(()) +} |