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

expect-expect customExpressions regex #267

Closed
barrykaplan opened this issue Oct 6, 2023 · 3 comments · Fixed by #328
Closed

expect-expect customExpressions regex #267

barrykaplan opened this issue Oct 6, 2023 · 3 comments · Fixed by #328

Comments

@barrykaplan
Copy link

Does this only take explicit name? When assertions are factored into to functions, where the name is unique to each, how can this be specified. A common prefix would be find. But I cannot seem to get any regex to work here.

    "vitest/expect-expect": [
      "error",
      {
        "customExpressions": [
          "expect",
          "expect.*"
        ]
      }
    ],
@gxxcastillo
Copy link

I'm finding that setting any value for vitest/expect-expect makes the rule stop working altogether.

For example this makes it so the rule stops working:

  rules: {
    'vitest/expect-expect': [
      'error',
      {
        customExpressions: ['expect'],
      },
    ],
  },

@gxxcastillo
Copy link

gxxcastillo commented Dec 1, 2023

I've tried disabling vitest/expect-expect and enabling jest/expect-expect instead but it seems that so long as I have vitest/expect-expect set then the values I pass for jest/expect-expect are ignored.

Disregard this comment, it's not clear to me if this issue with jest/expect-expect being ignore is not just a problem with my setup

@veritem
Copy link
Owner

veritem commented Dec 17, 2023

please provide a repro for this issue I can't reproduce with current test cases.

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

Successfully merging a pull request may close this issue.

3 participants