Skip to content

Integration tests should run integration tests, not unit tests, too - #140

Merged
edandylytics merged 1 commit into
developmentfrom
app/integration-test-roots
Oct 1, 2026
Merged

edandylytics merged 1 commit into
developmentfrom
app/integration-test-roots

Conversation

@edandylytics

Copy link
Copy Markdown
Collaborator

Fixes an issue where unit tests ran twice. In addition to being run with nx test-unit api, they were run with nx test-integration api because the integration jest config just ran all spec files it found. This PR updates the integration jest config to just run tests in the integration folder.

You can see the issue in this CI run. The app config unit tests runs here (line 77) and again here (line 888).

Now, the unit tests just run once, as unit tests.

You can check the totals to verify we're not dropping tests:

Before

Unit tests

Test Suites: 3 passed, 3 total
Tests:       35 passed, 35 total

Integration tests

Test Suites: 15 passed, 15 total
Tests:       372 passed, 372 total

After

Unit

Test Suites: 3 passed, 3 total
Tests:       35 passed, 35 total

Integration

Test Suites: 12 passed, 12 total
Tests:       337 passed, 337 total

372 - 25 = 337

The integration Jest config had no path filter, so the unit specs under
api/src ran in both the unit and integration suites.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@amazon-inspector-ohio

Copy link
Copy Markdown

⏳ I'm reviewing this pull request for security vulnerabilities and code quality issues. I'll provide an update when I'm done

@snyk-io-us

snyk-io-us Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@amazon-inspector-ohio

Copy link
Copy Markdown

✅ I finished the code review, and didn't find any security or code quality issues.

@edandylytics edandylytics changed the title Limit integration test run to api/integration Do not run unit tests twice Sep 30, 2026
@edandylytics edandylytics changed the title Do not run unit tests twice Integration tests should run integration tests, not unit tests, too Sep 30, 2026
@edandylytics
edandylytics merged commit c4ceb7a into development Oct 1, 2026
9 checks passed
@edandylytics
edandylytics deleted the app/integration-test-roots branch October 1, 2026 20:18
@edandylytics edandylytics mentioned this pull request Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants