find-test-names
Advanced tools
Comparing version 1.1.0 to 1.1.1
{ | ||
"name": "find-test-names", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Given a Mocha / Cypress spec file, returns the list of suite and test names", | ||
@@ -5,0 +5,0 @@ "main": "src", |
@@ -12,3 +12,8 @@ const acorn = require('acorn') | ||
// should we pass the ecma version here? | ||
const AST = acorn.parse(source, { ecmaVersion: 6 }) | ||
let AST | ||
try { | ||
AST = acorn.parse(source, { ecmaVersion: 2022, sourceType: 'script' }) | ||
} catch (e) { | ||
AST = acorn.parse(source, { ecmaVersion: 2022, sourceType: 'module' }) | ||
} | ||
@@ -15,0 +20,0 @@ const suiteNames = [] |
5001
49