mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 10:58:56 +00:00
* 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>
10 lines
290 B
JavaScript
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);
|
|
}
|