avajs/ava

Make line number selection work with TS and JSX syntax

開放

#3,065 建立於 2022年7月10日

 (3 則留言) (1 個反應) (0 位負責人)JavaScript (1,408 個分叉)batch import
enhancementhelp wantedscope:globbingscope:internalsscope:typescript

倉庫指標

星標
 (20,600 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

Line number selection relies on parsing the test file. This only supports JS syntax:

https://github.com/avajs/ava/blob/ac0d75d05d28e511b1b3654b09d11d602e360179/lib/worker/line-numbers.js#L9-L18

Acorn has a plugin for JSX. If we want to use that we need to decide whether to add it to AVA's dependencies or how else we register it.

There is no plugin for TypeScript. We'd have to work out a solution so that line number selection can work without using @ava/typescript. See https://github.com/avajs/ava/issues/3064 for making it work with @ava/typescript.

貢獻者指南