diff options
author | Bert Belder <bertbelder@gmail.com> | 2020-09-06 02:34:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-06 02:34:02 +0200 |
commit | c821e8f2f1fb8ad5e9eb00854277cafc8c80b2f5 (patch) | |
tree | c429a3c2707a4047fb512443a8468b7e15e5730d /test_plugin | |
parent | 849431eb1d112d1f79f4a327830dc1a5bf22dd47 (diff) |
Move JSON ops to deno_core (#7336)
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!"); } |