Skip to content

Instantly share code, notes, and snippets.

View nicolas-amabile's full-sized avatar

Nicolas Amabile nicolas-amabile

View GitHub Profile
@sbycrosz
sbycrosz / HierarchylessDetoxReporter.js
Last active December 6, 2020 19:36
Custom jest reporter for wix/detox that surpress printing of the entire page's UI hierarchy on failed spec
// HierarchylessDetoxReporter.js
// Custom jest reporter for wix/detox that surpress printing of the entire page's UI hierarchy on failed spec
// Github issue: https://github.com/wix/Detox/issues/992
// Usage (in your jest config): "reporters": ["./e2e/HierarchylessDetoxReporter.js"],
const StreamlineReporter = require('detox/runners/jest/streamlineReporter');
const HIERARCHY_REGEX_TRIMMER = /[\s\S]+?(?=Hierarchy)/;
class HierarchylessDetoxReporter extends StreamlineReporter {
@alanshaw
alanshaw / instructions.md
Created December 1, 2016 17:09
Using react-native-config-node with jest and other test runners

I’ve figured out how to use react-native-config-node with other test runners (I'm using jest) that might be a bit simpler and more generic than the method described in the README:

I installed the two modules:

npm install react-native-config-node babel-plugin-import-rename --save-dev

...and added the following config to my .babelrc: