src/language-js/print/template-literal.js/printTemplateLiteral
function printTemplateLiteral(path, print, options) {
  const node = path.getValue();
  const isTemplateLiteral = node.type === "TemplateLiteral";

  if (
    isTemplateLiteral &&
    isJestEachTemplateLiteral(node, path.getParentNode())
  ) {
    const printed = printJestEachTemplateLiteral(path, options, print);
    if (printed) {
      return printed;
    }
  }
  let expressionsKey = "expressions";
  if (node.type === "TSTemplateLiteralType") {
    expressionsKey = "types";
  }
  const parts = [];

  let expressions = path.map(print, expressionsKey);
  const isSimple = isSimpleTemplateLiteral(node);

  if (isSimple) {
    expressions = expressions.map(
      (doc) =>
        printDocToString(doc, { ...options, printWidth: Infinity }).formatted
    );
  }

  parts.push(lineSuffixBoundary, "`");

  path.each((childPath) => {
    const i = childPath.getName();

    parts.push(print(childPath));

    if (i < expressions.length) {
      // For a template literal of the following form:
      //   `someQuery {
      //     ${call({
      //       a,
      //       b,
      //     })}
      //   }`
      // the expression is on its own line (there is a \n in the previous
      // quasi literal), therefore we want to indent the JavaScript
      // expression inside at the beginning of ${ instead of the beginning
      // of the `.
      const { tabWidth } = options;
      const quasi = childPath.getValue();
      const indentSize = getIndentSize(quasi.value.raw, tabWidth);

      let printed = expressions[i];

      if (!isSimple) {
        const expression = node[expressionsKey][i];
        // Breaks at the template element boundaries (${ and }) are preferred to breaking
        // in the middle of a MemberExpression
        if (
          hasComment(expression) ||
          expression.type === "MemberExpression" ||
          expression.type === "OptionalMemberExpression" ||
          expression.type === "ConditionalExpression" ||
          expression.type === "SequenceExpression" ||
          expression.type === "TSAsExpression" ||
          isBinaryish(expression)
        ) {
          printed = concat([indent(concat([softline, printed])), softline]);
        }
      }

      const aligned =
        indentSize === 0 && quasi.value.raw.endsWith("\n")
          ? align(-Infinity, printed)
          : addAlignmentToDoc(printed, indentSize, tabWidth);

      parts.push(group(concat(["${", aligned, lineSuffixBoundary, "}"])));
    }
  }, "quasis");

  parts.push("`");

  return concat(parts);
}