1const {
2  DetoxCircusEnvironment,
3  SpecReporter,
4  WorkerAssignReporter,
5} = require('detox/runners/jest-circus');
6
7class CustomDetoxEnvironment extends DetoxCircusEnvironment {
8  constructor(config, context) {
9    super(config, context);
10
11    // Can be safely removed, if you are content with the default value (=300000ms)
12    this.initTimeout = 300000;
13
14    // This takes care of generating status logs on a per-spec basis. By default, Jest only reports at file-level.
15    // This is strictly optional.
16    this.registerListeners({
17      SpecReporter,
18      WorkerAssignReporter,
19    });
20  }
21}
22
23module.exports = CustomDetoxEnvironment;
24