Skip to content

Files

Latest commit

 

History

History

vscode

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Typescript snapshots plugin

Language service support for viewing/navigating to your test snapshots

Features

Snapshot content on quick info (hover):

quickinfo

Navigating to snapshot (Go to definition):

navigation

Dynamically constructed test names (Constants only)

dynamic

Configuration

You can configure various plugin settings in tsconfig.json/jsconfig.json file:

{
    "compilerOptions": {
        "plugins": [
            {
                "name": "typescript-snapshots-plugin",
                "snapshotDir": "__snapshots__",
                "snapshotCallIdentifiers": [
                    "toMatchSnapshot",
                    "myMatchSnapshot"
                ]
            }
        ],
    }
}

Look here for available configuration options

Snapshot syntax

Snapshot syntax file was copied from vscode-jest extension. Syntax issues/suggestions must be filled against vscode-jest repo.

Notes

If you're using a workspace version of Typescript, you must configure the TS server plugin manually by following these instructions