Skip to content

Commit

Permalink
chore(expect-expect): fix expect on skipped tests
Browse files Browse the repository at this point in the history
  • Loading branch information
veritem committed Dec 25, 2023
1 parent 423f0a7 commit b00417d
Show file tree
Hide file tree
Showing 2 changed files with 325 additions and 321 deletions.
8 changes: 6 additions & 2 deletions src/rules/expect-expect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,12 @@ export default createEslintRule<Options, MESSAGE_ID>({
}

return {
CallExpression(node) {
const name = getNodeName(node) ?? ''
CallExpression(node) {
if (node?.callee?.type === AST_NODE_TYPES.MemberExpression && node.callee.property.type === AST_NODE_TYPES.Identifier && node.callee.property.name === 'skip')
return

const name = getNodeName(node) ?? ''


if (isTypeOfVitestFnCall(node, context, ['test']) || additionalTestBlockFunctions.includes(name)) {
if (node.callee.type === AST_NODE_TYPES.MemberExpression && isSupportedAccessor(node.callee.property, 'todo')) return
Expand Down
Loading

0 comments on commit b00417d

Please sign in to comment.