Skip to content
This repository was archived by the owner on Mar 5, 2022. It is now read-only.

Commit 07adc02

Browse files
authored
fix: transpile integration folder too (#303)
the same preprocessor settings should be applied to component and integration folder when using react-scripts
1 parent 70340e1 commit 07adc02

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

plugins/cra-v3/file-preprocessor.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,20 @@ module.exports = config => {
3434
debug('coverage is disabled? %o', { coverageIsDisabled })
3535
debug('component test folder: %s', config.componentFolder)
3636
debug('fixtures folder', config.fixturesFolder)
37+
debug('integration test folder: %s', config.integrationFolder)
3738

38-
const additionalFolders = [config.componentFolder]
39-
// user can disable fixtures folder, so check first
39+
const additionalFolders = []
40+
// user can disable folders, so check first
41+
if (config.componentFolder) {
42+
additionalFolders.push(config.componentFolder)
43+
}
4044
if (config.fixturesFolder) {
4145
additionalFolders.push(config.fixturesFolder)
4246
}
47+
if (config.integrationFolder) {
48+
additionalFolders.push(config.integrationFolder)
49+
}
50+
debug('additional folders: %o', additionalFolders)
4351

4452
const opts = {
4553
reactScripts: true,

0 commit comments

Comments
 (0)