All Projects → asvetliakov → Typescript Snapshots Plugin

asvetliakov / Typescript Snapshots Plugin

Licence: mit
Snapshots language service support for Typescript

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Typescript Snapshots Plugin

Snapshot Diff
Diffing snapshot utility for Jest
Stars: ✭ 490 (+301.64%)
Mutual labels:  jest, snapshot, snapshot-testing
reducer-tester
Utilities for testing redux reducers
Stars: ✭ 19 (-84.43%)
Mutual labels:  jest, snapshot-testing, snapshot
pytest-snapshot
A plugin for snapshot testing with pytest.
Stars: ✭ 68 (-44.26%)
Mutual labels:  snapshot-testing, snapshot
GFontsSpace
Preview: https://pankajladhar.github.io/GFontsSpace
Stars: ✭ 88 (-27.87%)
Mutual labels:  jest, snapshot-testing
Playbook Ios
📘A library for isolated developing UI components and automatically taking snapshots of them.
Stars: ✭ 830 (+580.33%)
Mutual labels:  snapshot, snapshot-testing
Jest Image Snapshot
✨ Jest matcher for image comparisons. Most commonly used for visual regression testing.
Stars: ✭ 2,940 (+2309.84%)
Mutual labels:  jest, snapshot
jest-file-snapshot
Jest matcher to write snapshots to a separate file instead of the default snapshot file used by Jest
Stars: ✭ 35 (-71.31%)
Mutual labels:  jest, snapshot-testing
Snapguidist
Snapshot testing for React Styleguidist
Stars: ✭ 287 (+135.25%)
Mutual labels:  jest, snapshot-testing
Snap Shot It
Smarter snapshot utility for Mocha and BDD test runners + data-driven testing!
Stars: ✭ 138 (+13.11%)
Mutual labels:  snapshot, snapshot-testing
React Native Learning Resources
Collection of some good resources for react-native ✨ 🔥 💥
Stars: ✭ 61 (-50%)
Mutual labels:  jest, navigation
Enzyme To Json
Snapshot test your Enzyme wrappers
Stars: ✭ 954 (+681.97%)
Mutual labels:  jest, snapshot-testing
Syrupy
🥞 The sweeter pytest snapshot plugin
Stars: ✭ 73 (-40.16%)
Mutual labels:  snapshot, snapshot-testing
Snap Shot
Jest-like snapshot feature for the rest of us, works magically by finding the right caller function
Stars: ✭ 170 (+39.34%)
Mutual labels:  jest, snapshot
React Native Testing Example
Example of unit testing a React Native & Redux app using Jest (and Snapshots!)
Stars: ✭ 159 (+30.33%)
Mutual labels:  jest, snapshot
Verify
Verify is a snapshot tool that simplifies the assertion of complex data models and documents.
Stars: ✭ 210 (+72.13%)
Mutual labels:  snapshot, snapshot-testing
React Nativeish
React Native / React Native Web Boilerplate
Stars: ✭ 106 (-13.11%)
Mutual labels:  jest, snapshot
Cupaloy
Simple Go snapshot testing
Stars: ✭ 131 (+7.38%)
Mutual labels:  snapshot, snapshot-testing
Preact Jest Snapshot Test Boilerplate
🚀 Test Preact components using Jest snapshots
Stars: ✭ 24 (-80.33%)
Mutual labels:  jest, snapshot
Babel Test
An opinionated library to make testing babel plugins easier.
Stars: ✭ 79 (-35.25%)
Mutual labels:  jest, snapshot
Snapshooter
Snapshooter is a snapshot testing tool for .NET Core and .NET Framework
Stars: ✭ 118 (-3.28%)
Mutual labels:  snapshot, snapshot-testing

Typescript snapshots plugin

Language service support for viewing/navigating to your test snapshots

Features

Snapshot content on quick info (hover):

quickinfo

Navigation to snapshot (Go to definition):

navigation

Dynamically constructed test names (Constants only)

dynamic

Installation

npm install typescript-snapshots-plugin --save-dev

yarn add typescript-snapshots-plugin --dev

Add to your tsconfig.json:

    "plugins": [{
        "name": "typescript-snapshots-plugin",
    }]

If you are using VScode, tell it to use your local project TS version instead the VSCode bundled one

Configuration

In most cases you must be OK with default configuration. If it doesn't work for you, the plugin exposes few options:

snapshotCallIdentifiers List of snapshot matching call identifiers, such as toMatchSnapshot(), default:

[
    "toMatchSnapshot",
    "toThrowErrorMatchingSnapshot"
]

testBlockIdentifiers List of test call identifiers, such as it(), or describe(), default:

    "it",
    "it.only",
    "it.skip",
    "it.concurrent",
    "describe",
    "describe.only",
    "describe.skip",
    "context",
    "suite"

snapshotFileExtensions List of snapshot names extensions. These will be used to search the snapshot file for test path. First existing path wins, default:

[ ".snap" ]

snapshotDir Snapshot directory relative to the test file, default:

"__snapshots__"

useJSTagsForSnapshotHover Setting to true will render snapshot within fake jsdoc definition block. Since VSCode hover jsdoc supports markdown ```syntax``` the snapshot in hover widget will have slightly better syntax coloring. If you're using VSCode you may want to enable this, otherwise leave as false. Default: false

To pass your values, add them in tsconfig.json:

    "plugins": [{
        "name": "typescript-snapshots-plugin",
        "snapshotCallIdentifiers": [
            "toMatchSnapshot",
            "myMatchSnapshot"
        ],
        "testBlockIdentifiers": [
            ...
        ]
    }]
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].