Skip to content

Commit

Permalink
fix(expect-expert): change reporting node (#1452)
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath authored Oct 20, 2023
1 parent 82ab20a commit 64d5cda
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
32 changes: 16 additions & 16 deletions src/rules/__tests__/expect-expect.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ ruleTester.run('expect-expect', rule, {
errors: [
{
messageId: 'noAssertions',
type: AST_NODE_TYPES.CallExpression,
type: AST_NODE_TYPES.Identifier,
},
],
},
Expand All @@ -102,7 +102,7 @@ ruleTester.run('expect-expect', rule, {
errors: [
{
messageId: 'noAssertions',
type: AST_NODE_TYPES.CallExpression,
type: AST_NODE_TYPES.Identifier,
},
],
},
Expand All @@ -111,7 +111,7 @@ ruleTester.run('expect-expect', rule, {
errors: [
{
messageId: 'noAssertions',
type: AST_NODE_TYPES.CallExpression,
type: AST_NODE_TYPES.Identifier,
},
],
},
Expand All @@ -120,7 +120,7 @@ ruleTester.run('expect-expect', rule, {
errors: [
{
messageId: 'noAssertions',
type: AST_NODE_TYPES.CallExpression,
type: AST_NODE_TYPES.MemberExpression,
},
],
},
Expand All @@ -130,7 +130,7 @@ ruleTester.run('expect-expect', rule, {
errors: [
{
messageId: 'noAssertions',
type: AST_NODE_TYPES.CallExpression,
type: AST_NODE_TYPES.Identifier,
},
],
},
Expand All @@ -144,7 +144,7 @@ ruleTester.run('expect-expect', rule, {
errors: [
{
messageId: 'noAssertions',
type: AST_NODE_TYPES.CallExpression,
type: AST_NODE_TYPES.Identifier,
},
],
},
Expand All @@ -153,7 +153,7 @@ ruleTester.run('expect-expect', rule, {
errors: [
{
messageId: 'noAssertions',
type: AST_NODE_TYPES.CallExpression,
type: AST_NODE_TYPES.Identifier,
},
],
},
Expand All @@ -163,7 +163,7 @@ ruleTester.run('expect-expect', rule, {
errors: [
{
messageId: 'noAssertions',
type: AST_NODE_TYPES.CallExpression,
type: AST_NODE_TYPES.Identifier,
},
],
},
Expand All @@ -173,7 +173,7 @@ ruleTester.run('expect-expect', rule, {
errors: [
{
messageId: 'noAssertions',
type: AST_NODE_TYPES.CallExpression,
type: AST_NODE_TYPES.Identifier,
},
],
},
Expand Down Expand Up @@ -235,7 +235,7 @@ ruleTester.run('wildcards', rule, {
errors: [
{
messageId: 'noAssertions',
type: AST_NODE_TYPES.CallExpression,
type: AST_NODE_TYPES.Identifier,
},
],
},
Expand All @@ -245,7 +245,7 @@ ruleTester.run('wildcards', rule, {
errors: [
{
messageId: 'noAssertions',
type: AST_NODE_TYPES.CallExpression,
type: AST_NODE_TYPES.Identifier,
},
],
},
Expand All @@ -255,7 +255,7 @@ ruleTester.run('wildcards', rule, {
errors: [
{
messageId: 'noAssertions',
type: AST_NODE_TYPES.CallExpression,
type: AST_NODE_TYPES.Identifier,
},
],
},
Expand All @@ -265,7 +265,7 @@ ruleTester.run('wildcards', rule, {
errors: [
{
messageId: 'noAssertions',
type: AST_NODE_TYPES.CallExpression,
type: AST_NODE_TYPES.Identifier,
},
],
},
Expand All @@ -275,7 +275,7 @@ ruleTester.run('wildcards', rule, {
errors: [
{
messageId: 'noAssertions',
type: AST_NODE_TYPES.CallExpression,
type: AST_NODE_TYPES.Identifier,
},
],
},
Expand Down Expand Up @@ -338,7 +338,7 @@ ruleTester.run('expect-expect (aliases)', rule, {
errors: [
{
messageId: 'noAssertions',
type: AST_NODE_TYPES.CallExpression,
type: AST_NODE_TYPES.Identifier,
},
],
},
Expand All @@ -354,7 +354,7 @@ ruleTester.run('expect-expect (aliases)', rule, {
errors: [
{
messageId: 'noAssertions',
type: AST_NODE_TYPES.CallExpression,
type: AST_NODE_TYPES.MemberExpression,
},
],
},
Expand Down
2 changes: 1 addition & 1 deletion src/rules/expect-expect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export default createRule<
},
'Program:exit'() {
unchecked.forEach(node =>
context.report({ messageId: 'noAssertions', node }),
context.report({ messageId: 'noAssertions', node: node.callee }),
);
},
};
Expand Down

0 comments on commit 64d5cda

Please sign in to comment.