Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hover over .toMatchSnapshot() shows Jest method description instead of snapshot #39

Open
chrisbraddock opened this issue Dec 22, 2022 · 0 comments

Comments

@chrisbraddock
Copy link

VS Code 1.72.2
Plugin version: 0.4.0

This was working initially, but at some point along the way in my project I guess it stopped.

I just tried to use it and am now only seeing the Jest help on .toMatchSnapshot() hover

(method) jest.Matchers<void, GetRequestResponse>.toMatchSnapshot(snapshotName?: string | undefined): void (+1 overload)
This ensures that a value matches the most recent snapshot.

Check out [the Snapshot Testing guide](vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html) for more information.

Likewise, ctrl+click on .toMatchSnapshot() navigates to @types/jest/index.d.ts -> jest -> matchers -> toMatchSnapshot.

I tried adding the plugin to my tsconfig.json under compilerOptions:

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

I also clicked the TypeScript section of VSCode status bar and made sure it's using the workspace version and the correct tsconfig.json.

I've restarted the TypeScript sever afterwards, reloaded the window, even quit and restarted and the issue still persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant