Skip to content

chore(server-nestjs): make msw server listen setup consistent across specs - #2522

Closed
shikanime wants to merge 1 commit into
mainfrom
chore/server-nestjs-msw-listen-consistent
Closed

chore(server-nestjs): make msw server listen setup consistent across specs#2522
shikanime wants to merge 1 commit into
mainfrom
chore/server-nestjs-msw-listen-consistent

Conversation

@shikanime

Copy link
Copy Markdown
Member

Issues liées

N/A — chantier de cohérence interne aux tests.


Quel est le comportement actuel ?

Les 6 specs utilisant msw dans server-nestjs déclarent toutes le même cycle de vie (setupServer + listen / resetHandlers / close), mais vault-client.service.spec.ts est la seule à appeler server.listen() sans option. Les 5 autres (gitlab, keycloak ×4, nexus, registry, sonarqube) passent onUnhandledRequest: 'error', qui fait échouer le test sur toute requête non mockée.

Quel est le nouveau comportement ?

vault-client.service.spec.ts passe server.listen({ onUnhandledRequest: 'error' }) comme toutes les autres specs — même garde contre les requêtes non mockées, comportement inchangé sinon (8/8 tests verts).

Cette PR introduit-elle un breaking change ?

Non.

Autres informations

Commit unique 0bdbe275, aucun changement fonctionnel : une ligne de setup de test.

…specs

Signed-off-by: William Phetsinorath <william.phetsinorath-open@interieur.gouv.fr>
Change-Id: Ie7efad03571b61df1e20a568a3d723086a6a6964
@shikanime shikanime self-assigned this Aug 20, 2026
@shikanime shikanime added this to the 9.24.5 milestone Aug 20, 2026
@github-actions github-actions Bot added the built label Aug 20, 2026
@cloud-pi-native-sonarqube

Copy link
Copy Markdown

@shikanime shikanime closed this Aug 20, 2026
@shikanime
shikanime deleted the chore/server-nestjs-msw-listen-consistent branch August 20, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant