docs: function getRelevantStackFrom (stack) {
    var filteredStack = [];
    var relevantStack = [];
  
    stack = stack.split('\n');
  
    for (var i = 0; i < stack.length; i += 1) {
      if (isExternalStackEntry(stack[i])) {
        filteredStack.push(stack[i])
      }
    }
  
    // If the filtered stack is empty, i.e. the error originated entirely from within jasmine or karma, then the whole stack
    // should be relevant.
    if (filteredStack.length === 0) {
      filteredStack = stack
    }
  
    for (i = 0; i < filteredStack.length; i += 1) {
      if (filteredStack[i]) {
        relevantStack.push(filteredStack[i])
      }
    }
  
    return relevantStack
  }