@component-controls/jest-extract
TypeScript icon, indicating that this package has built-in type declarations

4.0.3 • Public • Published

Table of contents

Overview

Given a file name, retrives the jest tests and associated results.

Installation

This package is usually installed as part of the @component-controls package, but you can also install it standalone:

$ npm install @component-controls/jest-extract --save-dev

API

getRelatedTests

find all test files related to a component file

getRelatedTests source code

runRelatedTests

retrieves all the tests related to a componnet file

runRelatedTests source code

findJestConfig

findJestConfig source code

runTests

single test file execution

runTests source code

runProjectTests

run tests within the same project (jest config file)

runProjectTests source code

properties

Name Type Description
testFiles* string[] related test files to execute
projectFolder* string the folder with jest configuration or package.json
relativeFolder string if supplied, this is the folder from which to report the file names relative to for example this could be the folder where the tested component resides
options* Partial<Arguments<Partial<{ all: boolean; automock: boolean; bail: number | boolean; cache: boolean; cacheDirectory: string; changedFilesWithAncestor: boolean; changedSince: string; ci: boolean; clearCache: boolean; ... 77 more ...; watchPathIgnorePatterns: string[]; }>>> jest options. Can provide collectCoverageOnlyFrom to limit the files coverage is collected from

Readme

Keywords

Package Sidebar

Install

npm i @component-controls/jest-extract

Weekly Downloads

2

Version

4.0.3

License

MIT

Unpacked Size

26.9 kB

Total Files

9

Last publish

Collaborators

  • atanasster