Skip to content

Commit ec35829

Browse files
committed
fix: Only support ...Expect as a variation to expect. This prevents false negatives such as expectSomethingToBe() but still will catch softExpect() type variants.
Fixes #153
1 parent 73e4d06 commit ec35829

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/ast.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export type ExpectType = 'poll' | 'soft' | 'standalone';
123123
export function getExpectType(
124124
node: ESTree.CallExpression
125125
): ExpectType | undefined {
126-
if (isIdentifier(node.callee, /^expect|Expect$/)) {
126+
if (isIdentifier(node.callee, /(^expect|Expect)$/)) {
127127
return 'standalone';
128128
}
129129

0 commit comments

Comments
 (0)