How to use the jest-watcher.printRestoredPatternCaret function in jest-watcher

To help you get started, we’ve selected a few jest-watcher 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 jest-community / jest-watch-typeahead / src / test_name_plugin / prompt.js View on Github external
prompt.setPromptLength(total);

      matchedTests
        .slice(start, end)
        .map(name => formatTestNameByPattern(name, pattern, width - 4))
        .map((item, i) => formatTypeaheadSelection(item, i, index, prompt))
        .forEach(item => printTypeaheadItem(item, pipe));

      if (total > end) {
        printMore('test', pipe, total - end);
      }
    } else {
      printStartTyping('test name', pipe);
    }

    printRestoredPatternCaret(pattern, this._currentUsageRows, pipe);
  }
github jest-community / jest-watch-typeahead / src / file_name_plugin / prompt.js View on Github external
path,
            width,
          );
          return highlight(path, filePath, pattern, context.config.rootDir);
        })
        .map((item, i) => formatTypeaheadSelection(item, i, index, prompt))
        .forEach(item => printTypeaheadItem(item, pipe));

      if (total > end) {
        printMore('file', pipe, total - end);
      }
    } else {
      printStartTyping('filename', pipe);
    }

    printRestoredPatternCaret(pattern, this._currentUsageRows, pipe);
  }

jest-watcher

Delightful JavaScript Testing.

MIT
Latest version published 11 months ago

Package Health Score

91 / 100
Full package analysis

Similar packages