Files
bun.sh/test/napi/napi-app/main.js
Olivier Guimbal 6e7014c91b Fix napi_get_value_string_utf8 to match node (#7175)
* fix napi_get_value_string_utf8 to match node
closes #6949

* [autofix.ci] apply automated fixes

* Update test/napi/napi.test.ts

Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>

* Update test/napi/napi.test.ts

Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2023-11-17 05:27:58 -08:00

10 lines
290 B
JavaScript

const tests = require("./build/Release/napitests.node");
const fn = tests[process.argv[2]];
if (typeof fn !== "function") {
throw new Error("Unknown test:", process.argv[2]);
}
const result = fn.apply(null, JSON.parse(process.argv[3] ?? "[]"));
if (result) {
throw new Error(result);
}