Skip to content

Instantly share code, notes, and snippets.

@noomorph
Last active February 10, 2024 12:05
Show Gist options
  • Save noomorph/156c8ea33dce4fe2a25421f699143faa to your computer and use it in GitHub Desktop.
Save noomorph/156c8ea33dce4fe2a25421f699143faa to your computer and use it in GitHub Desktop.
Detox + Allure2 adapter (alpha version)
/** @type {import('@jest').Config} */
module.exports = {
rootDir: '..',
testMatch: ['<rootDir>/e2e/**/*.test.js'],
testTimeout: 120000,
maxWorkers: 1,
globalSetup: 'detox/runners/jest/globalSetup',
globalTeardown: 'detox/runners/jest/globalTeardown',
// ↓ Pay attention
reporters: [
'detox/runners/jest/reporter',
['jest-allure2-reporter', {
/* see https://github.com/wix-incubator/jest-allure2-reporter/blob/beta/index.d.ts */
}],
],
testEnvironment: 'detox/runners/jest/testEnvironment',
// ↓ Pay attention
testEnvironmentOptions: {
eventListeners: [
'jest-metadata/environment-listener',
'jest-allure2-reporter/environment-listener',
'detox-allure2-adapter',
],
},
verbose: true,
};
{
"name": "detox-sample",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"detox": "20.14.7",
"detox-allure2-adapter": "^1.0.0-alpha.3",
"jest": "^29.7.0",
"jest-allure2-reporter": "^2.0.0-beta.5",
"jest-metadata": "^1.3.1"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment