Bez popisu

init.js 677B

1234567891011121314151617181920212223242526
  1. const detox = require('detox');
  2. const config = require('../package.json').detox;
  3. const adapter = require('detox/runners/jest/adapter');
  4. const specReporter = require('detox/runners/jest/specReporter');
  5. // Set the default timeout
  6. jest.setTimeout(120000);
  7. jasmine.getEnv().addReporter(adapter);
  8. // This takes care of generating status logs on a per-spec basis. By default, jest only reports at file-level.
  9. // This is strictly optional.
  10. jasmine.getEnv().addReporter(specReporter);
  11. beforeAll(async () => {
  12. await detox.init(config);
  13. });
  14. beforeEach(async () => {
  15. await adapter.beforeEach();
  16. });
  17. afterAll(async () => {
  18. await adapter.afterAll();
  19. await detox.cleanup();
  20. });