Skip to content

ReactSelectorExtractor

reference
1 min readUpdated

Kind: Class

Source: atloria-monorepo/packages/doc-automation/src/v2/stages/stage-01-parse/detectors/react-selector-extractor.ts

React Selector Extractor

Methods

MethodSignatureReturns
extractFromJsxextractFromJsx(jsx: string)ExtractedSelectors

Where it refuses work

  • ReactSelectorExtractor stops the work with an early return when !jsx || jsx.trim().length === 0.
  • ReactSelectorExtractor stops the work with an early return when testId.
  • ReactSelectorExtractor stops the work with an early return when id.
  • ReactSelectorExtractor stops the work with an early return when name.
  • ReactSelectorExtractor stops the work with an early return when firstClass.
  • ReactSelectorExtractor stops the work with an early return when match.

Was this page helpful?

Download as PDF