• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

inclusion-numerique / coop-mediation-numerique / a499b582-7152-4ae6-bfae-41b25ff83c10

31 Mar 2026 03:49PM UTC coverage: 7.472% (-3.2%) from 10.692%
a499b582-7152-4ae6-bfae-41b25ff83c10

Pull #466

circleci

marc-gavanier
refactor(inscription): extract ajouterLieuxActivite into modular use-case

Refactor 174 lines of mixed logic into composable, testable functions:

- domain/types.ts: Pure type definitions
- domain/classifyLieu.ts: Pure classification logic (4 cases)
- domain/filterAlreadyLinked.ts: Pure filtering logic
- dependencies/types.ts: Injectable dependency contracts
- dependencies/prisma.ts: Production implementations
- dependencies/inMemory.ts: Test implementations (no mocks)
- strategies/processClassifiedLieu.ts: Case execution
- ajouterLieuxActivite.ts: Orchestration (~40 lines)

23 unit tests with real in-memory implementations.
Fixes issue where structures from API Entreprise were not being created.
Pull Request #466: refactor(inscription): extract ajouterLieuxActivite into modular use-case

500 of 10544 branches covered (4.74%)

Branch coverage included in aggregate %.

145 of 186 new or added lines in 15 files covered. (77.96%)

1379 existing lines in 152 files now uncovered.

1500 of 16224 relevant lines covered (9.25%)

36.99 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/apps/web/src/test/testSessionUser.ts
1
import type { SessionUser } from '@app/web/auth/sessionUser'
2
import { previewBranchAuthFallbacks } from '../auth/previewBranchAuthFallbacks'
3

UNCOV
4
export const testSessionUser = {
×
5
  id: 'test',
6
  email: 'jean.biche@example.com',
7
  phone: '0123456789',
8
  firstName: 'Jean',
9
  lastName: 'Biche',
10
  name: 'Jean Biche',
11
  role: 'User',
12
  siret: previewBranchAuthFallbacks.anctSiret,
13
  updated: new Date('2023-05-05').toISOString(),
14
  created: new Date('2023-01-01').toISOString(),
15
  hasSeenOnboarding: new Date('2023-01-01').toISOString(),
16
  emailVerified: null,
17
  isFixture: false,
18
  usurper: null,
19
  isConseillerNumerique: false,
20
  coordinateur: null,
21
  emplois: [],
22
  inscriptionValidee: null,
23
  lieuxActiviteRenseignes: null,
24
  mediateur: null,
25
  profilInscription: null,
26
  acceptationCgu: null,
27
  structureEmployeuseRenseignee: null,
28
  rdvAccount: null,
29
  featureFlags: [],
30
  timezone: 'Europe/Paris',
31
} satisfies SessionUser
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc