AWS Codebuild Test reports

Instead of a large build log, use a report

Published: Friday, Apr 29, 2022 Last modified: Monday, Aug 8, 2022

Adding to the AWS buildspec.yml:

reports:
  jest_reports:
	files:
	  - junit.xml
	file-format: JUNITXML
	base-directory: test-results/

And to your Jest configuration jest.config.js:

reporters: [
    'default',
    [
        'jest-junit',
        {
            outputDirectory: './test-results',
            outputName: 'junit.xml',
        },
    ],
],

https://docs.aws.amazon.com/codebuild/latest/userguide/test-report-jest.html