-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
Description
Line number selection relies on parsing the test file. This only supports JS syntax:
ava/lib/worker/line-numbers.js
Lines 9 to 18 in ac0d75d
function parse(file) { | |
// Avoid loading these until we actually need to select tests by line number. | |
const acorn = require('acorn'); | |
const walk = require('acorn-walk'); | |
const ast = acorn.parse(fs.readFileSync(file, 'utf8'), { | |
ecmaVersion: 11, | |
locations: true, | |
sourceType: 'module', | |
}); |
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 #3064 for making it work with @ava/typescript
.
Drew-Daniels