jest-watcher
- Version 29.7.0
- Published
- 23.4 kB
- 8 dependencies
- MIT license
Install
npm i jest-watcher
yarn add jest-watcher
pnpm add jest-watcher
Overview
Delightful JavaScript Testing.
Index
Variables
Functions
Classes
Interfaces
Type Aliases
Variables
variable KEYS
const KEYS: { ARROW_DOWN: string; ARROW_LEFT: string; ARROW_RIGHT: string; ARROW_UP: string; BACKSPACE: string; CONTROL_C: string; CONTROL_D: string; CONTROL_U: string; ENTER: string; ESCAPE: string;};
Functions
function printPatternCaret
printPatternCaret: (pattern: string, pipe: NodeJS.WritableStream) => void;
function printRestoredPatternCaret
printRestoredPatternCaret: ( pattern: string, currentUsageRows: number, pipe: NodeJS.WritableStream) => void;
Classes
class BaseWatchPlugin
abstract class BaseWatchPlugin implements WatchPlugin {}
constructor
constructor({ stdin, stdout,}: { stdin: NodeJS.ReadStream; stdout: NodeJS.WriteStream;});
method apply
apply: (_hooks: JestHookSubscriber) => void;
method getUsageInfo
getUsageInfo: (_globalConfig: Config.GlobalConfig) => UsageData | null;
method onKey
onKey: (_key: string) => void;
method run
run: ( _globalConfig: Config.GlobalConfig, _updateConfigAndRun: UpdateConfigCallback) => Promise<void | boolean>;
class JestHook
class JestHook {}
constructor
constructor();
method getEmitter
getEmitter: () => Readonly<JestHookEmitter>;
method getSubscriber
getSubscriber: () => Readonly<JestHookSubscriber>;
method isUsed
isUsed: (hook: AvailableHooks) => boolean;
class PatternPrompt
abstract class PatternPrompt {}
constructor
constructor(_pipe: NodeJS.WritableStream, _prompt: Prompt, _entityName?: string);
method run
run: ( onSuccess: (value: string) => void, onCancel: () => void, options?: { header: string }) => void;
class Prompt
class Prompt {}
constructor
constructor();
method abort
abort: () => void;
method enter
enter: ( onChange: (pattern: string, options: ScrollOptions_2) => void, onSuccess: (pattern: string) => void, onCancel: () => void) => void;
method isEntering
isEntering: () => boolean;
method put
put: (key: string) => void;
method setPromptLength
setPromptLength: (length: number) => void;
method setPromptSelection
setPromptSelection: (selected: string) => void;
class TestWatcher
class TestWatcher extends Emittery<{ change: State;}> {}
constructor
constructor({ isWatchMode }: { isWatchMode: boolean });
property state
state: State;
method isInterrupted
isInterrupted: () => boolean;
method isWatchMode
isWatchMode: () => boolean;
method setState
setState: (state: State) => Promise<void>;
Interfaces
interface WatchPlugin
interface WatchPlugin {}
property apply
apply?: (hooks: JestHookSubscriber) => void;
property getUsageInfo
getUsageInfo?: (globalConfig: Config.GlobalConfig) => UsageData | null;
property isInternal
isInternal?: boolean;
property onKey
onKey?: (value: string) => void;
property run
run?: ( globalConfig: Config.GlobalConfig, updateConfigAndRun: UpdateConfigCallback) => Promise<void | boolean>;
interface WatchPluginClass
interface WatchPluginClass {}
construct signature
new (options: { config: Record<string, unknown>; stdin: NodeJS.ReadStream; stdout: NodeJS.WriteStream;}): WatchPlugin;
Type Aliases
type AllowedConfigOptions
type AllowedConfigOptions = Partial< Pick< Config.GlobalConfig, | 'bail' | 'changedSince' | 'collectCoverage' | 'collectCoverageFrom' | 'coverageDirectory' | 'coverageReporters' | 'findRelatedTests' | 'nonFlagArgs' | 'notify' | 'notifyMode' | 'onlyFailures' | 'reporters' | 'testNamePattern' | 'testPathPattern' | 'updateSnapshot' | 'verbose' > & { mode: 'watch' | 'watchAll'; }>;
type JestHookEmitter
type JestHookEmitter = { onFileChange: (fs: JestHookExposedFS) => void; onTestRunComplete: (results: AggregatedResult) => void; shouldRunTestSuite: (testSuiteInfo: TestSuiteInfo) => Promise<boolean> | boolean;};
type JestHookSubscriber
type JestHookSubscriber = { onFileChange: (fn: FileChange) => void; onTestRunComplete: (fn: TestRunComplete) => void; shouldRunTestSuite: (fn: ShouldRunTestSuite) => void;};
type ScrollOptions
type ScrollOptions_2 = { offset: number; max: number;};
type UpdateConfigCallback
type UpdateConfigCallback = (config?: AllowedConfigOptions) => void;
type UsageData
type UsageData = { key: string; prompt: string;};
Package Files (1)
Dependencies (8)
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/jest-watcher
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/jest-watcher)
- HTML<a href="https://www.jsdocs.io/package/jest-watcher"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2664 ms. - Missing or incorrect documentation? Open an issue for this package.