summaryrefslogtreecommitdiff
path: root/test_plugin/tests
diff options
context:
space:
mode:
Diffstat (limited to 'test_plugin/tests')
-rw-r--r--test_plugin/tests/integration_tests.rs2
-rw-r--r--test_plugin/tests/test.js13
2 files changed, 10 insertions, 5 deletions
diff --git a/test_plugin/tests/integration_tests.rs b/test_plugin/tests/integration_tests.rs
index 17002fc01..8716048b1 100644
--- a/test_plugin/tests/integration_tests.rs
+++ b/test_plugin/tests/integration_tests.rs
@@ -57,7 +57,7 @@ fn basic() {
println!("stderr {}", stderr);
}
assert!(output.status.success());
- let expected = "Hello from plugin. data: test | zero_copy: test\nPlugin Sync Response: test\nHello from plugin. data: test | zero_copy: test\nPlugin Async Response: test\n";
+ let expected = "Hello from plugin. data: test\nzero_copy[0]: test\nzero_copy[1]: 123\nzero_copy[2]: cba\nPlugin Sync Response: test\nHello from plugin. data: test\nzero_copy[0]: test\nzero_copy[1]: 123\nPlugin Async Response: test\n";
assert_eq!(stdout, expected);
assert_eq!(stderr, "");
}
diff --git a/test_plugin/tests/test.js b/test_plugin/tests/test.js
index 8d6146902..fbe58aeb8 100644
--- a/test_plugin/tests/test.js
+++ b/test_plugin/tests/test.js
@@ -33,7 +33,9 @@ function runTestSync() {
const response = Deno.core.dispatch(
testSync,
new Uint8Array([116, 101, 115, 116]),
- new Uint8Array([116, 101, 115, 116])
+ new Uint8Array([116, 101, 115, 116]),
+ new Uint8Array([49, 50, 51]),
+ new Uint8Array([99, 98, 97])
);
console.log(`Plugin Sync Response: ${textDecoder.decode(response)}`);
@@ -47,7 +49,8 @@ function runTestAsync() {
const response = Deno.core.dispatch(
testAsync,
new Uint8Array([116, 101, 115, 116]),
- new Uint8Array([116, 101, 115, 116])
+ new Uint8Array([116, 101, 115, 116]),
+ new Uint8Array([49, 50, 51])
);
if (response != null || response != undefined) {
@@ -80,9 +83,11 @@ function runTestPluginClose() {
const preStr = JSON.stringify(resourcesPre, null, 2);
const postStr = JSON.stringify(resourcesPost, null, 2);
if (preStr !== postStr) {
- throw new Error(`Difference in open resources before openPlugin and after Plugin.close():
+ throw new Error(
+ `Difference in open resources before openPlugin and after Plugin.close():
Before: ${preStr}
-After: ${postStr}`);
+After: ${postStr}`
+ );
}
}