diff options
Diffstat (limited to 'test_plugin')
-rw-r--r-- | test_plugin/src/lib.rs | 5 | ||||
-rw-r--r-- | test_plugin/tests/test.js | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/test_plugin/src/lib.rs b/test_plugin/src/lib.rs index bb4c4d8ff..468fae491 100644 --- a/test_plugin/src/lib.rs +++ b/test_plugin/src/lib.rs @@ -1,4 +1,3 @@ -use deno_core::plugin_api::Buf; use deno_core::plugin_api::Interface; use deno_core::plugin_api::Op; use deno_core::plugin_api::ZeroCopyBuf; @@ -23,7 +22,7 @@ fn op_test_sync( println!("zero_copy[{}]: {}", idx, buf_str); } let result = b"test"; - let result_box: Buf = Box::new(*result); + let result_box: Box<[u8]> = Box::new(*result); Op::Sync(result_box) } @@ -47,7 +46,7 @@ fn op_test_async( }); assert!(rx.await.is_ok()); let result = b"test"; - let result_box: Buf = Box::new(*result); + let result_box: Box<[u8]> = Box::new(*result); result_box }; diff --git a/test_plugin/tests/test.js b/test_plugin/tests/test.js index 2c1913f92..c9d3c5f01 100644 --- a/test_plugin/tests/test.js +++ b/test_plugin/tests/test.js @@ -65,11 +65,11 @@ function runTestOpCount() { const end = Deno.metrics(); - if (end.opsCompleted - start.opsCompleted !== 1) { + if (end.opsCompleted - start.opsCompleted !== 2) { // one op for the plugin and one for Deno.metrics throw new Error("The opsCompleted metric is not correct!"); } - if (end.opsDispatched - start.opsDispatched !== 1) { + if (end.opsDispatched - start.opsDispatched !== 2) { // one op for the plugin and one for Deno.metrics throw new Error("The opsDispatched metric is not correct!"); } |