message: Strip inconsistent stack trace lines
diff: @@ -17,14 +17,30 @@ const dir = path.resolve(__dirname, '../failures');
  skipOnWindows.suite();
  +// Some node versions add an extra line to the error stack trace. This makes
  +// snapshot tests fail on different machines. This function makes sure
  +// this extra line is always removed.
  +const stripInconsistentStackLines = summary => {
  + summary.rest = summary.rest.replace(/\n^.*process\._tickCallback.*$/gm, '');
  + return summary;
  +};
  +
  test('throwing not Error objects', () => {
  let stderr;
  stderr = runJest(dir, ['throw-number-test.js']).stderr;
  - expect(extractSummary(stderr)).toMatchSnapshot();
  + expect(stripInconsistentStackLines(
  + extractSummary(stderr),
  + )).toMatchSnapshot();
  stderr = runJest(dir, ['throw-string-test.js']).stderr;
  - expect(extractSummary(stderr)).toMatchSnapshot();
  + expect(stripInconsistentStackLines(
  + extractSummary(stderr),
  + )).toMatchSnapshot();
  stderr = runJest(dir, ['throw-object-test.js']).stderr;
  - expect(extractSummary(stderr)).toMatchSnapshot();
  + expect(stripInconsistentStackLines(
  + extractSummary(stderr),
  + )).toMatchSnapshot();
  stderr = runJest(dir, ['assertion-count-test.js']).stderr;
  - expect(extractSummary(stderr)).toMatchSnapshot();
  + expect(stripInconsistentStackLines(
  + extractSummary(stderr),
  + )).toMatchSnapshot();
  });
  