Hi Guys.
Seems projects doesn't work as intended. I have jest config which is intended to run all my type of tests:
module.exports = {
projects: ['./jest.config.ui.js', './jest.config.unit.js']
};
It is impossible that file of unit tests would be grabbed by ui tests, see regex:
ui: testRegex: '/__tests__/.*-test\\.js?$',
unit: testMatch: ['**/__tests__/**/?(*.)+(spec).js']
These ui and unit configs have different setups. For example for ui tests I need to resolve all css files successfully, I do this via:
moduleNameMapper: {
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'./resources/__mocks__/fileMock.js',
'\\.(css|sass|scss|less)$': 'identity-obj-proxy'
},
unit tests config doesn't have this setup.
So, when I run ui and unit tests separately - all good.
When I try to run all tests config - I see that moduleNameMapper doesn't work for ui tests.

In total, expected behaviour:
File which is found for UI test should be executed with the help of appropriate config.
UPD: DEMO
To see behavior please clone repo https://github.com/deser/jest_issue-7268 and follow steps in README.md
Hi Guys.
Seems
projectsdoesn't work as intended. I have jest config which is intended to run all my type of tests:It is impossible that file of
unittests would be grabbed byuitests, see regex:ui:testRegex: '/__tests__/.*-test\\.js?$',unit:testMatch: ['**/__tests__/**/?(*.)+(spec).js']These
uiandunitconfigs have different setups. For example foruitests I need to resolve allcssfiles successfully, I do this via:unittests config doesn't have this setup.So, when I run
uiandunittests separately - all good.When I try to run
alltests config - I see thatmoduleNameMapperdoesn't work foruitests.In total, expected behaviour:
File which is found for UI test should be executed with the help of appropriate config.
UPD: DEMO
To see behavior please clone repo https://github.com/deser/jest_issue-7268 and follow steps in README.md