adobe / aem-spa-project-archetype

Maven Archetype for creating new AEM SPA projects
Apache License 2.0
61 stars 32 forks source link

[react-app] Migrate karma tests to jest #36 #37

Closed lydiapuric closed 5 years ago

lydiapuric commented 5 years ago

With #27 jest is used for testing.

lydiapuric commented 5 years ago

CircleCI failed with message: [INFO] [INFO] Running 'npm run build' in /home/circleci/repo/target/test-classes/projects/react/project/test-spa-react/react-app ... [INFO] [ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:npm (npm run build) on project test-spa-react-react-app: Failed to run task: 'npm run build' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1] Checking, locally not reproducible for me...

Further information: [INFO] [INFO] Creating an optimized production build... [INFO] [INFO] [INFO] [INFO] Treating warnings as errors because process.env.CI = true.

godanny86 commented 5 years ago

@lydiapuric I think the build is failing because the flag CI=true and treats warnings as errors:

[INFO] [INFO] ./src/components/Page/Page.js
[INFO] [INFO]   Line 16:  'React' is defined but never used  no-unused-vars
[INFO] [INFO] 
[INFO] [INFO] ./src/Utils.js
[INFO] [INFO]   Line 16:  'Constants' is defined but never used  no-unused-vars
[INFO] [INFO] 
[INFO] [INFO] ./src/RouteHelper.js
[INFO] [INFO]   Line 17:  'Constants' is defined but never used  no-unused-vars

Updating those files to remove the unused variables i think would resolve it

lydiapuric commented 5 years ago

Thanks @godanny86 for reviewing!