@jest/source-map
- Version 30.5.2
- Published
- 36.6 kB
- 4 dependencies
- MIT license
Install
npm i @jest/source-mapyarn add @jest/source-mappnpm add @jest/source-mapOverview
Applies source maps to stack traces, so a failing test points at the code you wrote rather than at the code Jest ran.
Index
Functions
Classes
Interfaces
Type Aliases
Functions
function getCallsite
getCallsite: ( level: number, sourceMaps?: SourceMapRegistry | null) => callsites.CallSite;One remapped
CallSite,levelframes above the caller.Deprecated
Use
SourceMapSupport#getCallsiteinstead.
Classes
class SourceMapSupport
class SourceMapSupport {}constructor
constructor();method getCallsite
getCallsite: ( level: number, sourceMaps?: SourceMapRegistry | null) => callsites.CallSite;One remapped
CallSite,levelframes above the caller.
method install
install: ( sourceMaps?: SourceMapRegistry | null, options?: SourceMapSupportInstallOptions) => void;Replaces
Error.prepareStackTracein the current realm, soerror.stackrenders frames against the original sources.Stays installed for the lifetime of the worker — each call swaps in its own cache. There is deliberately no
uninstall: restoring V8's formatter at teardown would leave an error thrown after the environment is torn down pointing into the transformed file. Holding the cache does not retain the environment: it only ever references path strings and parsed source maps.
Interfaces
interface SourceMapSupportInstallOptions
interface SourceMapSupportInstallOptions {}property suppressWarnings
suppressWarnings?: boolean;Turns off the once-per-map warning about maps that cannot be parsed.
Type Aliases
type SourceMapRegistry
type SourceMapRegistry = ReadonlyMap<string, string>;Transformed file path to the map file written for it.
Package Files (1)
Dependencies (4)
Dev Dependencies (2)
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/source-map.
- Markdown[](https://www.jsdocs.io/package/@jest/source-map)
- HTML<a href="https://www.jsdocs.io/package/@jest/source-map"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 1813 ms. - Missing or incorrect documentation? Open an issue for this package.
