function hasFatalParseError(errorMessage, ...lines) {
  const result = parser.parseText(lines.join('\n'), 'testfile');
  if (!result.errors.length) {
    throw new Error('Had errors no errors!');
  }
  if (result.errors.length > 1) {
    throw new Error(
        'Had too many errors: ' +
        result.errors.map(e => e.toString()).join('\n'));
  }
  const actual = result.errors[0];
  expect(actual.fatal).toBe(true);
  expect(actual.message).toBe(errorMessage);
}
@param {string} errorMessage Expected error message
@param {...string} lines Code lines to parse