After updating to react-native 0.63.3 and xcode 12.0.1 the tests are not working anymore. First had some issues building detox but that was solved. Now this error is there and I cannot go further:
DetoxRuntimeError: Detox instance has not been initializedHINT: Make sure to call detox.init() before your test begins
detox.init() is being called and I can see it in the logs.
This is my init.js
import { device } from 'detox';const detox = require('detox');const config = require('../package.json').detox;const adapter = require('detox/runners/jest/adapter');const specReporter = require('detox/runners/jest/specReporter');const assignReporter = require('detox/runners/jest/assignReporter');jest.setTimeout(180000);jasmine.getEnv().addReporter(adapter);jasmine.getEnv().addReporter(specReporter);jasmine.getEnv().addReporter(assignReporter);beforeAll(async () => { await detox.init(config, { launchApp: false }); const permissions = { notifications: 'NO', camera: 'NO', }; await device.launchApp({ permissions });});beforeEach(async () => { await adapter.beforeEach();});afterAll(async () => { await adapter.afterAll(); await detox.cleanup();});
My environment:
React-Native: 0.63.3 Detox: 17.10.3 xcode: 12.0.1 iOS: 14.0
Running on ios.sim.debug