Estoy tratando de ejecutar una prueba de appium como se describe aquí, https://blog.logrocket.com/testing-your-react-native-app-with-appium/
Sin embargo, recibo un error: ¿cómo puedo hacer que funcione mi prueba básica?
> webdriverio-sample-appium-tests@1.0.0 test /Users/user/apps/myracnative/appium > mocha test/basic ReferenceError: beforeAll is not defined at Object.<anonymous> (/Users/user/apps/myracnative/appium/test/basic/index.js:16:1)Prueba:
index.js const wd = require("wd"); const jasmine = require("jasmine"); jasmine.DEFAULT_TIMEOUT_INTERVAL = 600000; const PORT = 4723; const config = { platformName: "iOS", platformVersion: "14.4", deviceName: "iPhone 11", app: "../../../apps/myracnative.ipa", automationName: "XCUITest", // UiAutomator2, Espresso, or UiAutomator1 for Android }; const driver = wd.promiseChainRemote("localhost", PORT); beforeAll(async () => { await driver.init(config); }); test("Test Accessibilty Id", async () => { expect( await driver.hasElementByAccessibilityId("Create account") ).toBe(true); expect(await driver.hasElementByAccessibilityId("Log in")).toBe(true); });Aquí hay un enlace a mi repositorio de prueba: