Jest: SyntaxError: Invalid regular expression: /(?<!dist)/test/(unit|it)/.*\.test.js$/: Invalid group

Created on 22 Oct 2018  路  2Comments  路  Source: facebook/jest

馃悰 Bug Report

I get an error for invalid regular expression for the following Regex:
(?<!dist)/test/(unit|it)/.*\\.test.js$

To Reproduce

use the following configuration in jest.config.js file:

module.exports = {
    testRegex: '(?<!dist)/test/(unit|it)/.*\\.test.js$',
}

npx envinfo --preset jest

System:
   OS: macOS High Sierra 10.13.6
   CPU: x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
 Binaries:
   Node: 8.9.1 - ~/.nvm/versions/node/v8.9.1/bin/node
   npm: 5.5.1 - ~/.nvm/versions/node/v8.9.1/bin/npm
 npmPackages:
    @stylable/jest: ^0.1.12 => 0.1.12 
Needs Repro

Most helpful comment

I had an old node version!!!
Works with node 10.
Thanks :)

(@zivl posted this for me)

All 2 comments

It works for me.
image

Please include a reproduction which fails on Jest 23

I had an old node version!!!
Works with node 10.
Thanks :)

(@zivl posted this for me)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hramos picture hramos  路  3Comments

kentor picture kentor  路  3Comments

samzhang111 picture samzhang111  路  3Comments

Secretmapper picture Secretmapper  路  3Comments

kgowru picture kgowru  路  3Comments