From 677258138b300b60d008b66debc8131de75e38da Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Fri, 9 Oct 2026 15:17:53 -0300 Subject: [PATCH] test(e2e): fix __name usage on FS test --- packages/api-e2e/test/helpers/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/api-e2e/test/helpers/index.ts b/packages/api-e2e/test/helpers/index.ts index aee3ea668..323614d89 100644 --- a/packages/api-e2e/test/helpers/index.ts +++ b/packages/api-e2e/test/helpers/index.ts @@ -140,7 +140,12 @@ export async function tauri( // driver gets to interpret its shape: the Selenium atoms that Appium runs // scripts through on iOS turn any object with a numeric `length` property // into an array. + // + // The specs are transpiled by esbuild with `keepNames`, which wraps named + // functions declared inside `fn` in a `__name(...)` helper that only exists in + // the spec module, so the page gets a stand-in. const script = ` + var __name = function (target) { return target; }; var done = arguments[arguments.length - 1]; var args = Array.prototype.slice.call(arguments, 0, arguments.length - 1); var fn = (${fn.toString()});