Skip to content

Commit

Permalink
fix: Only support ...Expect as a variation to expect. This preven…
Browse files Browse the repository at this point in the history
…ts false negatives such as `expectSomethingToBe()` but still will catch `softExpect()` type variants.

Fixes #153
  • Loading branch information
mskelton committed Jul 4, 2023
1 parent 73e4d06 commit ec35829
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/ast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export type ExpectType = 'poll' | 'soft' | 'standalone';
export function getExpectType(
node: ESTree.CallExpression
): ExpectType | undefined {
if (isIdentifier(node.callee, /^expect|Expect$/)) {
if (isIdentifier(node.callee, /(^expect|Expect)$/)) {
return 'standalone';
}

Expand Down

0 comments on commit ec35829

Please sign in to comment.