How to use the jest-editor-support.ParsedNodeTypes.it function in jest-editor-support

To help you get started, we’ve selected a few jest-editor-support examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github forcedotcom / salesforcedx-vscode / packages / salesforcedx-vscode-lwc / src / testSupport / testIndexer / jestUtils.ts View on Github external
function populateAncestorTitlesRecursive(
  node: ParsedNodeWithAncestorTitles,
  ancestorTitles: string[],
  itBlocksWithAncestorTitles: ItBlockWithAncestorTitles[]
) {
  node.ancestorTitles = ancestorTitles;
  if (node.type === ParsedNodeTypes.it) {
    itBlocksWithAncestorTitles.push(node as ItBlockWithAncestorTitles);
  }
  if (
    node.type === ParsedNodeTypes.root ||
    node.type === ParsedNodeTypes.describe
  ) {
    if (!node.children) {
      return;
    }
    node.children.forEach(childNode => {
      populateAncestorTitlesRecursive(
        childNode,
        node.name ? [...ancestorTitles, node.name] : ancestorTitles,
        itBlocksWithAncestorTitles
      );
    });

jest-editor-support

[![Build Status](https://github.com/jest-community/jest-editor-support/actions/workflows/node-ci.yml/badge.svg)](https://github.com/jest-community/jest-editor-support/actions) [![Coverage Status](https://coveralls.io/repos/github/jest-community/jest-edito

MIT
Latest version published 20 days ago

Package Health Score

72 / 100
Full package analysis

Similar packages