export type Pair<K, V> = { Key: K, Value: V };

export function captureStack() {
  try { throw new Error(); } catch (e) { return e.stack; }
}
export type Pair<K, V> = { Key: K, Value: V };

export function captureStack(): string {
  try { throw new Error(); } catch (e) { return e.stack; }
}

export function detectTestRunner() {
  let stack = captureStack();
  return stack.split('\n').find(x => !!x.match(/[\\\/](enzyme|mocha)[\\\/]/i)) !== null;
}
Check to see if we're in a test runner via dodgy af means
Check to see if we're in a test runner via dodgy af means
