Skip to content

Commit c5c8502

Browse files
authored
fix: fix fixture parsing with lowered async with esbuild 0.25.3 (#7921)
1 parent 573cb16 commit c5c8502

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/runner/src/fixture.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ function getUsedProps(fn: Function) {
245245
// __async(this, null, function*
246246
// __async(this, arguments, function*
247247
// __async(this, [_0, _1], function*
248-
if (/__async\(this, (?:null|arguments|\[[_0-9, ]*\]), function\*/.test(fnString)) {
249-
fnString = fnString.split('__async(this,')[1]
248+
if (/__async\((?:this|null), (?:null|arguments|\[[_0-9, ]*\]), function\*/.test(fnString)) {
249+
fnString = fnString.split(/__async\((?:this|null),/)[1]
250250
}
251251
const match = fnString.match(/[^(]*\(([^)]*)/)
252252
if (!match) {

0 commit comments

Comments
 (0)