summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorMatt Mastracci <matthew@mastracci.com>2024-02-12 13:46:50 -0700
committerGitHub <noreply@github.com>2024-02-12 13:46:50 -0700
commitf60720090c7bd8cdf91d7aebd0c42e01c86b3b83 (patch)
tree9becb7ff7e40d37769601fa049beccd101d58a98 /cli
parentbd1358efab8ba7339a8e70034315fa7da840292e (diff)
chore: move test_ffi and test_nap to tests/ [WIP] (#22394)
Moving some additional NAPI and. FFI tests out of the tree root.
Diffstat (limited to 'cli')
-rw-r--r--cli/bench/napi/bench.js2
-rw-r--r--cli/bench/napi/bench_node.mjs2
-rw-r--r--cli/napi/README.md10
3 files changed, 7 insertions, 7 deletions
diff --git a/cli/bench/napi/bench.js b/cli/bench/napi/bench.js
index d2aac63df..c12c7aacb 100644
--- a/cli/bench/napi/bench.js
+++ b/cli/bench/napi/bench.js
@@ -1,6 +1,6 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
-import { loadTestLibrary } from "../../../test_napi/common.js";
+import { loadTestLibrary } from "../../../tests/napi/common.js";
const lib = loadTestLibrary();
diff --git a/cli/bench/napi/bench_node.mjs b/cli/bench/napi/bench_node.mjs
index 2593aadd2..82e06f08f 100644
--- a/cli/bench/napi/bench_node.mjs
+++ b/cli/bench/napi/bench_node.mjs
@@ -2,7 +2,7 @@ import { bench, run } from "mitata";
import { createRequire } from "module";
const require = createRequire(import.meta.url);
-const lib = require("../../../test_napi.node");
+const lib = require("../../../tests/napi.node");
bench("warmup", () => {});
bench("napi_get_undefined", () => lib.test_get_undefined(0));
diff --git a/cli/napi/README.md b/cli/napi/README.md
index e40d4719d..ec637e1bd 100644
--- a/cli/napi/README.md
+++ b/cli/napi/README.md
@@ -50,11 +50,11 @@ Update the generated symbol lists using the script:
deno run --allow-write tools/napi/generate_symbols_lists.js
```
-Add a test in [`/test_napi`](../../test_napi/). You can also refer to Node.js
+Add a test in [`/tests/napi`](../../tests/napi/). You can also refer to Node.js
test suite for Node-API.
```js
-// test_napi/boolean_test.js
+// tests/napi/boolean_test.js
import { assertEquals, loadTestLibrary } from "./common.js";
const lib = loadTestLibrary();
Deno.test("napi get boolean", function () {
@@ -64,7 +64,7 @@ Deno.test("napi get boolean", function () {
```
```rust
-// test_napi/src/boolean.rs
+// tests/napi/src/boolean.rs
use napi_sys::Status::napi_ok;
use napi_sys::ValueType::napi_boolean;
@@ -96,7 +96,7 @@ pub fn init(env: napi_env, exports: napi_value) {
```
```diff
-// test_napi/src/lib.rs
+// tests/napi/src/lib.rs
+ mod boolean;
@@ -114,4 +114,4 @@ unsafe extern "C" fn napi_register_module_v1(
}
```
-Run the test using `cargo test -p test_napi`.
+Run the test using `cargo test -p tests/napi`.