mirror of
https://github.com/denoland/deno
synced 2024-11-05 18:45:24 +00:00
fix(test_plugin): Add README.md and make function use same data (#9128)
This commit is contained in:
parent
06bd692e5c
commit
eb30c6f510
3 changed files with 11 additions and 4 deletions
9
test_plugin/README.md
Normal file
9
test_plugin/README.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
# `test_plugin` crate
|
||||
|
||||
## To run this test manually
|
||||
|
||||
```
|
||||
cd test_plugin
|
||||
|
||||
../target/debug/deno run --unstable --allow-plugin tests/test.js debug
|
||||
```
|
|
@ -1,7 +1,4 @@
|
|||
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
|
||||
// To run this test manually:
|
||||
// cd test_plugin
|
||||
// ../target/debug/deno run --unstable --allow-plugin tests/test.js debug
|
||||
|
||||
use std::process::Command;
|
||||
use test_util::deno_cmd;
|
||||
|
@ -37,7 +34,7 @@ fn basic() {
|
|||
println!("stderr {}", stderr);
|
||||
}
|
||||
assert!(output.status.success());
|
||||
let expected = "Hello from plugin.\nzero_copy[0]: test\nzero_copy[1]: 123\nzero_copy[2]: cba\nPlugin Sync Response: test\nHello from plugin.\nzero_copy[0]: test\nzero_copy[1]: 123\nPlugin Async Response: test\n";
|
||||
let expected = "Hello from plugin.\nzero_copy[0]: test\nzero_copy[1]: 123\nzero_copy[2]: cba\nPlugin Sync Response: test\nHello from plugin.\nzero_copy[0]: test\nzero_copy[1]: 123\nzero_copy[2]: cba\nPlugin Async Response: test\n";
|
||||
assert_eq!(stdout, expected);
|
||||
assert_eq!(stderr, "");
|
||||
}
|
||||
|
|
|
@ -53,6 +53,7 @@ function runTestAsync() {
|
|||
testAsync,
|
||||
new Uint8Array([116, 101, 115, 116]),
|
||||
new Uint8Array([49, 50, 51]),
|
||||
new Uint8Array([99, 98, 97]),
|
||||
);
|
||||
|
||||
if (response != null || response != undefined) {
|
||||
|
|
Loading…
Reference in a new issue