Skip to content

Commit

Permalink
chore(expect-expect): use TestCaseName enum instead of string literals
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath committed Oct 5, 2019
1 parent 9d85b75 commit b8c03ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rules/expect-expect.ts
Expand Up @@ -7,7 +7,7 @@ import {
AST_NODE_TYPES,
TSESTree,
} from '@typescript-eslint/experimental-utils';
import { createRule, getNodeName } from './utils';
import { TestCaseName, createRule, getNodeName } from './utils';

export default createRule<
[Partial<{ assertFunctionNames: readonly string[] }>],
Expand Down Expand Up @@ -44,7 +44,7 @@ export default createRule<
return {
CallExpression(node) {
const name = getNodeName(node.callee);
if (name === 'it' || name === 'test') {
if (name === TestCaseName.it || name === TestCaseName.test) {
unchecked.push(node);
} else if (name && assertFunctionNames.includes(name)) {
// Return early in case of nested `it` statements.
Expand Down

0 comments on commit b8c03ee

Please sign in to comment.