Skip to content

Quickstart: Jest

1. Enable the JUnit reporter

bash
npm install --save-dev jest-junit
js
// jest.config.js
module.exports = {
    reporters: [
        'default',
        ['jest-junit', { outputDirectory: 'junit-results', outputName: 'junit.xml' }],
    ],
};

2. Run tests

bash
npm test

3. Upload to Sulu

bash
suluctl upload --results ./junit-results

Set SULU_URL / SULU_TOKEN / SULU_PROJECT_ID first (see suluctl).

Sulu Test Management System