Rider is picking unit test library inconsistently

Hi,

I started a new project using react v.16 and want to configure test files outside of src folder and don't want to eject the entire project for that. I've configured test script in package.json to use jest command and added custom jest configuration in my package.json.

 

When i run one of the tests in my test folder Rider uses this command in Run window

> react-scripts --testNamePattern=Test1

other test is run with the command below

> jest --testNamePattern=Test2

I know these are not exact commands but their full versions are respectively different. 

 

Do anyone know why this is happening and is there a way for me to get Rider pick one consistently?

 

I'm using Windows 10.

1 comment
Comment actions Permalink

How many package.json files do you have in your project?

The logic currently used by JavaScript support plugin for detecting what test runner is available for a given test file is based on dependencies declarations in package.json nearest to this file: it looks for known test runners listed there and tries to run the most suitable one

0

Please sign in to leave a comment.