Skip to content

Could not find a test for file Hyperlink.test.tsx.snap #3

Description

@thijssmudde

Hi! Awesome nvim plugin. It's exactly what I'm looking for. Can you help me in achieving the following?

I have the following example:

Hyperlink.helpers.tsx
Hyperlink.stories.tsx
Hyperlink.test.tsx
Hyperlink.test.tsx.snap
Hyperlink.tsx

Here is the current mapping:

jumpwire.setup({
  language = {
    ["tsx"] = {
      test = { type = "fileExtension", data = "test.tsx" },
      snap = { type = "fileExtension", data = "test.tsx.snap" },
      stories = { type = "fileExtension", data = "stories.tsx" },
      helpers = { type = "fileExtension", data = "helpers.tsx" },
    },
    ["test.tsx"] = {
      implementation = { type = "fileExtension", data = "tsx" },
      snap = { type = "fileExtension", data = "test.tsx.snap" },
      stories = { type = "fileExtension", data = "stories.tsx" },
      helpers = { type = "fileExtension", data = "helpers.tsx" },
    },
    ["text.tsx.snap"] = {
      implementation = { type = "fileExtension", data = "tsx" },
      test = { type = "fileExtension", data = "test.tsx" },
      stories = { type = "fileExtension", data = "stories.tsx" },
      helpers = { type = "fileExtension", data = "helpers.tsx" },
    },
    ["stories.tsx"] = {
      implementation = { type = "fileExtension", data = "tsx" },
      test = { type = "fileExtension", data = "test.tsx" },
      snap = { type = "fileExtension", data = "test.tsx.snap" },
      helpers = { type = "fileExtension", data = "helpers.tsx" },
    },
    ["helpers.tsx"] = {
      implementation = { type = "fileExtension", data = "tsx" },
      test = { type = "fileExtension", data = "test.tsx" },
      snap = { type = "fileExtension", data = "test.tsx.snap" },
      stories = { type = "fileExtension", data = "stories.tsx" },
    },
  },
})

This works fine if my startpoint is Hyperlink.tsx => HyperLink.test.tsx or a helpers/stories/snapshot.

However, this setup does not work when moving back from from test/helpers/stories/snapshot back to the implementation file. The plugin says: "Could not find a test for file Hyperlink.test.tsx.snap"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions