Skip to content

test: replace mocks with real fake implementations - #3017

Merged
tada5hi merged 3 commits into
masterfrom
refactor/test-fakes-over-mocks
Apr 26, 2026
Merged

tada5hi merged 3 commits into
masterfrom
refactor/test-fakes-over-mocks

Conversation

@tada5hi

@tada5hi tada5hi commented Apr 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Tests

    • Refactored many unit tests to use shared fake test doubles (permission, identity, mail, OAuth2, session, actors); assertions now verify recorded call data instead of spy calls.
    • Standardized how denial/behavior scenarios are configured across tests for clearer, consistent permission and identity checks.
  • Chores

    • Replaced numerous inline mocks with reusable fake helpers and consolidated test helper exports to simplify and harmonize test setup.

Copilot AI review requested due to automatic review settings April 25, 2026 20:45
@coderabbitai

coderabbitai Bot commented Apr 25, 2026 •

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 516b1ac5-efb4-4a14-97e8-9c6b1768a1e4

📥 Commits

Reviewing files that changed from the base of the PR and between e2a56ce and 92a276f.

📒 Files selected for processing (1)
  • apps/server-core/test/unit/core/helpers/fake-oauth2-token-repository.ts

📝 Walkthrough

Walkthrough

Replaces inline Vitest mocks and a deprecated mock-actor helper with a suite of concrete fake test doubles and updates 40+ unit tests to use call-recording fakes for permission evaluation, identity providers/resolvers, OAuth2 helpers, mail, and session management.

Changes

Cohort / File(s) Summary
New Fake Helpers
apps/server-core/test/unit/core/helpers/fake-permission-evaluator.ts, .../fake-actor.ts, .../fake-identity-permission-provider.ts, .../fake-identity-resolver.ts, .../fake-identity-role-provider.ts, .../fake-mail-client.ts, .../fake-oauth2-key-repository.ts, .../fake-oauth2-token-issuer.ts, .../fake-oauth2-token-repository.ts, .../fake-oauth2-token-signer.ts, .../fake-session-manager.ts
Adds 11 fake implementations with call-recording and configurable behaviors (deny/setBehavior/setSuperset/etc.). Review exported types, behavior API surface, and call-record shapes.
Helpers Index Update
apps/server-core/test/unit/core/helpers/index.ts
Replaces mock-actor re-export with the new fake helper exports; updates test import surface.
Removed Mock Actor
apps/server-core/test/unit/core/helpers/mock-actor.ts
Deletes the old vi.fn()-based mock-actor module; replaced by fake-actor.ts + FakePermissionEvaluator.
Actor factory swaps & evaluator assertion updates (entity tests)
apps/server-core/test/unit/core/entities/.../service.spec.ts
(e.g., client*.service.spec.ts, client-role.service.spec.ts, client-scope.service.spec.ts, client.service.spec.ts, permission*.service.spec.ts, realm.service.spec.ts, robot*.service.spec.ts, role*.service.spec.ts, scope.service.spec.ts, user*.service.spec.ts, etc.)
Switches imports from mock-actor → fake-actor; replaces vi mock call assertions with checks against fake evaluator call arrays (e.g., preEvaluateCalls, evaluateOneOfCalls) using toContainEqual / array checks.
Identity permission provider tests
apps/server-core/test/unit/core/entities/*-role/service.spec.ts, .../identity-provider-role-mapping/service.spec.ts
Replace inline IIdentityPermissionProvider vi.fn mocks with FakeIdentityPermissionProvider; configure superset/bindings via setSuperset/setBindings.
Permission evaluator migrations (various tests)
apps/server-core/test/unit/core/entities/*/service.spec.ts (role-attribute, robot, user, etc.)
Move from vi.fn()/mockRejectedValue to FakePermissionEvaluator usage (deny, setBehavior); assertions updated to inspect recorded call arrays.
Mail client tests
apps/server-core/test/unit/core/identity/registration/service.spec.ts, .../password-recovery/service.spec.ts
Replace mocked IMailClient.send with FakeMailClient; assert on mailClient.sent and use failNext() to simulate failures.
OAuth2 tests & helpers
apps/server-core/test/unit/core/oauth2/... (grant-types, token issuer/verifier/signer specs)
Replace inline token/key/session mocks with fakes (FakeOAuth2TokenRepository, FakeOAuth2TokenSigner, FakeOAuth2KeyRepository, FakeOAuth2TokenIssuer, FakeSessionManager, FakeIdentityResolver); update assertions to use fakes' call arrays (e.g., insertCalls, signCalls, issueCalls, saveWithSignatureCalls).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

Possibly related PRs

Poem

🐇 I hopped through tests both near and far,
Swapped mocks for fakes that log each call,
They capture traces, deny and cheer,
Now suites are clearer, small and tall. 🥕

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'test: replace mocks with real fake implementations' is concise and clearly summarizes the main change: migrating from Vitest mocks to dedicated fake test doubles across the test suite.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/test-fakes-over-mocks

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors server-core unit tests to replace ad-hoc vi.fn() mocks with reusable “fake” implementations, reducing duplication and making test setups more realistic and consistent.

Changes:

  • Added a suite of reusable fake implementations (OAuth2 repos/issuer/signer, session manager, permission evaluator/actor, mail client, identity resolver/role/permission providers).
  • Updated multiple unit test suites to use the new fakes and seed behavior via helper APIs instead of per-test mock wiring.
  • Removed the legacy mock-actor helper and updated helper exports/imports accordingly.

Reviewed changes

Copilot reviewed 39 out of 39 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
apps/server-core/test/unit/core/oauth2/token/verifier/module.spec.ts Switches token verifier tests from inline repository mocks to fake OAuth2 repos with seeding helpers.
apps/server-core/test/unit/core/oauth2/token/signer/module.spec.ts Uses FakeOAuth2KeyRepository instead of local mock key repository.
apps/server-core/test/unit/core/oauth2/token/issuer/open-id/module.spec.ts Uses fake token repo/signer/identity resolver instead of inline mocks.
apps/server-core/test/unit/core/oauth2/token/issuer/access/module.spec.ts Uses fake token repo/signer and fake role provider, simplifying access-claim tests.
apps/server-core/test/unit/core/oauth2/grant-types/identity.spec.ts Replaces mock token issuers and session manager with fake implementations.
apps/server-core/test/unit/core/identity/registration/service.spec.ts Replaces mocked mail client with FakeMailClient and asserts via sent/failNext.
apps/server-core/test/unit/core/identity/password-recovery/service.spec.ts Replaces mocked mail client with FakeMailClient and asserts via sent/failNext.
apps/server-core/test/unit/core/helpers/mock-actor.ts Removes old mock actor helper in favor of new fake-based actor utilities.
apps/server-core/test/unit/core/helpers/index.ts Updates helper barrel exports to include new fake helpers and drop mock-actor.
apps/server-core/test/unit/core/helpers/fake-session-manager.ts Adds a fake ISessionManager backed by an in-memory map and vi.fn methods.
apps/server-core/test/unit/core/helpers/fake-permission-evaluator.ts Adds configurable fake permission evaluator supporting per-method deny/behavior hooks.
apps/server-core/test/unit/core/helpers/fake-oauth2-token-signer.ts Adds fake token signer returning a configurable signature.
apps/server-core/test/unit/core/helpers/fake-oauth2-token-repository.ts Adds in-memory fake token repository with inactive tracking and signature cache.
apps/server-core/test/unit/core/helpers/fake-oauth2-token-issuer.ts Adds fake token issuer producing signed token strings and payloads with jti/exp.
apps/server-core/test/unit/core/helpers/fake-oauth2-key-repository.ts Adds fake key repository returning a configurable key.
apps/server-core/test/unit/core/helpers/fake-mail-client.ts Adds fake mail client that records sends and can fail deterministically.
apps/server-core/test/unit/core/helpers/fake-identity-role-provider.ts Adds fake identity role provider returning configurable roles.
apps/server-core/test/unit/core/helpers/fake-identity-resolver.ts Adds fake identity resolver returning a configurable identity.
apps/server-core/test/unit/core/helpers/fake-identity-permission-provider.ts Adds fake identity permission provider with configurable superset/bindings/junction policy.
apps/server-core/test/unit/core/helpers/fake-actor.ts Adds fake actor helpers powered by FakePermissionEvaluator.
apps/server-core/test/unit/core/entities/user/service.spec.ts Migrates actor mocking to FakePermissionEvaluator and fake actor helpers.
apps/server-core/test/unit/core/entities/user-role/service.spec.ts Uses FakeIdentityPermissionProvider and fake actor helpers; removes inline provider mocks.
apps/server-core/test/unit/core/entities/user-permission/service.spec.ts Updates actor helper import to fake-actor.
apps/server-core/test/unit/core/entities/user-attribute/service.spec.ts Migrates permission evaluator behavior to FakePermissionEvaluator APIs.
apps/server-core/test/unit/core/entities/scope/service.spec.ts Updates actor helper import to fake-actor.
apps/server-core/test/unit/core/entities/role/service.spec.ts Updates actor helper import to fake-actor.
apps/server-core/test/unit/core/entities/role-permission/service.spec.ts Updates actor helper import to fake-actor.
apps/server-core/test/unit/core/entities/role-attribute/service.spec.ts Uses FakePermissionEvaluator.setBehavior instead of vi.mocked implementations.
apps/server-core/test/unit/core/entities/robot/service.spec.ts Migrates actors to FakePermissionEvaluator and updates deny behavior via fake API.
apps/server-core/test/unit/core/entities/robot-role/service.spec.ts Uses FakeIdentityPermissionProvider and fake actor helpers; removes inline provider mocks.
apps/server-core/test/unit/core/entities/robot-permission/service.spec.ts Updates actor helper import to fake-actor.
apps/server-core/test/unit/core/entities/realm/service.spec.ts Updates actor helper import to fake-actor.
apps/server-core/test/unit/core/entities/permission/service.spec.ts Updates actor helper import to fake-actor.
apps/server-core/test/unit/core/entities/permission-policy/service.spec.ts Updates actor helper import to fake-actor.
apps/server-core/test/unit/core/entities/identity-provider-role-mapping/service.spec.ts Uses FakeIdentityPermissionProvider and fake actor helpers; removes inline provider mocks.
apps/server-core/test/unit/core/entities/client/service.spec.ts Migrates permission denial to FakePermissionEvaluator.deny.
apps/server-core/test/unit/core/entities/client-scope/service.spec.ts Updates actor helper import to fake-actor.
apps/server-core/test/unit/core/entities/client-role/service.spec.ts Uses FakeIdentityPermissionProvider and fake actor helpers; removes inline provider mocks.
apps/server-core/test/unit/core/entities/client-permission/service.spec.ts Updates actor helper import to fake-actor.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

export class FakeOAuth2TokenSigner implements IOAuth2TokenSigner {
constructor(private signature = 'signed-token') {}

public readonly sign = vi.fn(async () => this.signature);

Copilot AI Apr 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IOAuth2TokenSigner.sign is defined as sign(payload), but this fake mock is declared with no parameters. While runtime calls work, it makes sign(payload) a TypeScript error when using the concrete FakeOAuth2TokenSigner type and reduces type safety around call args. Please update the mock signature to accept the payload parameter (even if unused).

Suggested change
public readonly sign = vi.fn(async () => this.signature);
public readonly sign = vi.fn(async (_payload) => this.signature);

Copilot uses AI. Check for mistakes.

public readonly refresh = vi.fn(async (session: Session) => session);

public readonly verify = vi.fn(async () => {});

Copilot AI Apr 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ISessionManager.verify(session) expects a Session parameter, but the fake mock is declared with no parameters. This makes fake.verify(session) a TypeScript error when the instance is typed as FakeSessionManager and weakens typed call assertions. Please align the mock signature to accept the session argument (even if unused).

Suggested change
public readonly verify = vi.fn(async () => {});
public readonly verify = vi.fn(async (session: Session) => {});

Copilot uses AI. Check for mistakes.
Comment on lines +19 to +21
public readonly findByRealmId = vi.fn(async () => this.key);

public readonly findById = vi.fn(async () => this.key);

Copilot AI Apr 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

findByRealmId / findById are declared as mocks with no parameters, even though IOAuth2KeyRepository requires (realmId: string) and (id: string). When the fake is used directly (typed as FakeOAuth2KeyRepository), calling these methods with arguments becomes a TypeScript error and makes assertions on call args less type-safe. Please update the mock signatures to accept the expected parameters (even if unused).

Suggested change
public readonly findByRealmId = vi.fn(async () => this.key);
public readonly findById = vi.fn(async () => this.key);
public readonly findByRealmId = vi.fn(async (realmId: string) => {
return this.key;
});
public readonly findById = vi.fn(async (id: string) => {
return this.key;
});

Copilot uses AI. Check for mistakes.
this.identity = identity;
}

public readonly resolve = vi.fn(async () => this.identity);

Copilot AI Apr 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIdentityResolver.resolve takes (type, key, realmKey?), but this fake mock is declared with no parameters. This makes resolver.resolve(type, key) a TypeScript error when the instance is referenced as FakeIdentityResolver (and weakens type safety for call expectations). Please align the mock’s parameter list with the interface signature (even if the args are unused).

Suggested change
public readonly resolve = vi.fn(async () => this.identity);
public readonly resolve = vi.fn(async (type, key, realmKey?) => this.identity);

Copilot uses AI. Check for mistakes.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (6)
apps/server-core/test/unit/core/helpers/fake-identity-permission-provider.ts (1)

34-48: Wrap interface methods with vi.fn for parity with sibling fakes.

Unlike the other helpers in this PR (FakeIdentityRoleProvider, FakeIdentityResolver, FakeOAuth2TokenSigner, FakeOAuth2TokenRepository, …), getFor/isSuperset/resolveJunctionPolicy are plain methods. That blocks specs from asserting call args/counts (expect(provider.getFor).toHaveBeenCalledWith(identity)) and is inconsistent with the rest of the suite. Consider:

♻️ Proposed refactor
-    async getFor(_identity: IdentityPolicyData): Promise<PermissionPolicyBinding[]> {
-        return this.bindings;
-    }
-
-    async isSuperset(_parent: IdentityPolicyData, _child: IdentityPolicyData): Promise<boolean> {
-        return this.supersetResult;
-    }
-
-    async resolveJunctionPolicy(
-        _identity: IdentityPolicyData,
-        _options: ResolveJunctionPolicyOptions,
-    ): Promise<Policy | undefined> {
-        return this.junctionPolicy;
-    }
+    public readonly getFor = vi.fn(async (_identity: IdentityPolicyData): Promise<PermissionPolicyBinding[]> => this.bindings);
+
+    public readonly isSuperset = vi.fn(
+        async (_parent: IdentityPolicyData, _child: IdentityPolicyData): Promise<boolean> => this.supersetResult,
+    );
+
+    public readonly resolveJunctionPolicy = vi.fn(
+        async (_identity: IdentityPolicyData, _options: ResolveJunctionPolicyOptions): Promise<Policy | undefined> => this.junctionPolicy,
+    );

…and add import { vi } from 'vitest';.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/server-core/test/unit/core/helpers/fake-identity-permission-provider.ts`
around lines 34 - 48, The three methods on FakeIdentityPermissionProvider
(getFor, isSuperset, resolveJunctionPolicy) are plain async functions which
prevents test spies from asserting calls; wrap each method with vitest spies
(vi.fn) and import { vi } from 'vitest'. Replace the plain methods by assigning
getFor = vi.fn(async (_identity: IdentityPolicyData) => this.bindings),
isSuperset = vi.fn(async (_parent, _child) => this.supersetResult) and
resolveJunctionPolicy = vi.fn(async (_identity, _options) =>
this.junctionPolicy) so tests can assert call counts and args while preserving
existing return behavior.
apps/server-core/test/unit/core/identity/registration/service.spec.ts (1)

118-120: Subject assertion is locale-coupled.

Same nit as in password-recovery/service.spec.ts: hard-coded 'Activation' couples the assertion to an English template. Asserting on the recipient and that a subject exists (or a stable template identifier) would be more resilient to copy/i18n changes.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/server-core/test/unit/core/identity/registration/service.spec.ts` around
lines 118 - 120, The test currently asserts a locale-dependent subject string by
checking mailClient.sent[0].subject contains 'Activation'; update the assertion
to avoid i18n coupling by asserting the recipient and that a subject exists
(e.g., expect(mailClient.sent[0]).toMatchObject({ to: data.email }) and
expect(mailClient.sent[0].subject).toBeTruthy()) or, if the mail system provides
a stable template identifier, assert that identifier instead (check
mailClient.sent[0].templateId or similar). Ensure you modify the assertions
referencing mailClient.sent and data.email in the registration service test to
use subject existence or templateId rather than the hard-coded 'Activation'
substring.
apps/server-core/test/unit/core/identity/password-recovery/service.spec.ts (1)

126-128: Subject assertion is locale-coupled.

toContain('Reset') depends on the English template. If subjects ever become i18n-driven or are renamed, this assertion will silently break. Consider asserting on a stable structural marker (template name, header, or the recipient + a non-empty subject) instead of an English keyword.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/server-core/test/unit/core/identity/password-recovery/service.spec.ts`
around lines 126 - 128, The subject assertion in the password-recovery test is
coupled to English text; instead of
expect(mailClient.sent[0].subject).toContain('Reset') update the assertion to
use a stable marker such as checking the mail record metadata or structure
(e.g., assert mailClient.sent[0] contains a template identifier or header field
if available), or at minimum assert the subject is a non-empty string and that
the recipient matches (keep expect(mailClient.sent).toHaveLength(1) and
expect(mailClient.sent[0]).toMatchObject({ to: email })); locate references to
mailClient.sent and the subject assertion in the test and replace the
language-dependent check with a template/header or non-empty subject assertion.
apps/server-core/test/unit/core/helpers/fake-permission-evaluator.ts (1)

21-65: Solid design — optional: consider a reset() / allowAll() helper.

The chained deny semantics (each call wraps previous) is nice for layering, but it means there is no way to "undo" a prior deny without calling setBehavior(() => {}). For per-test instances this is moot, but if any test reuses an evaluator across sub-cases it could surprise. A small explicit helper (e.g. allowAll()) would document the intent.

♻️ Tiny addition
+    allowAll() {
+        this.behavior = () => {};
+    }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/server-core/test/unit/core/helpers/fake-permission-evaluator.ts` around
lines 21 - 65, Add a small helper on FakePermissionEvaluator to reset behavior
to a permissive no-op (e.g. allowAll() or reset()) so tests can undo prior
deny() calls without using setBehavior directly; implement it to set
this.behavior = () => Promise.resolve() (or () => {} if synchronous) and export
the method alongside existing methods (FakePermissionEvaluator.allowAll / reset)
so callers can call it to clear layered denies created by deny() and restore
default permissive behavior.
apps/server-core/test/unit/core/entities/user/service.spec.ts (1)

57-74: Consider promoting createSelfActor to the shared fake-actor.ts helper.

Several other entity service specs (robot, client, scope, user-attribute, etc.) likely need the same "actor whose identity matches a specific user id" shape. Centralizing this avoids divergence (e.g., the inline 'test-realm' realm name here mirrors createNonMasterRealmActor and could drift).

♻️ Sketch of a shared helper
// in fake-actor.ts
export function createSelfActor(
    userId: string,
    options: { userName?: string; realmId?: string; realmName?: string } = {},
): FakeActorContext {
    const id = options.realmId || randomUUID();
    return {
        permissionEvaluator: new FakePermissionEvaluator(),
        identity: {
            type: IdentityType.USER,
            data: {
                id: userId,
                name: options.userName || 'self-user',
                realm_id: id,
                realm: { id, name: options.realmName || 'test-realm' } as Realm,
            } as User,
        },
    };
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/server-core/test/unit/core/entities/user/service.spec.ts` around lines
57 - 74, Promote the local createSelfActor test helper into the shared
fake-actor.ts by exporting a createSelfActor(userId: string, options?: {
userName?: string; realmId?: string; realmName?: string }) function; keep the
existing structure (FakePermissionEvaluator, IdentityType.USER, User with
id/name, realm_id and realm object) but replace hard-coded 'test-realm' with
options.realmName || 'test-realm' and use options.realmId || randomUUID(); then
update tests (including this spec) to import the shared createSelfActor instead
of the inline function to ensure consistency across entity service specs.
apps/server-core/test/unit/core/helpers/fake-session-manager.ts (1)

13-30: Remove the redundant as string cast on session.id.

On line 17, (session.id as string) || randomUUID() unnecessarily casts session.id when it's already string | undefined from Partial<Session>. Simplifying to session.id || randomUUID() preserves the same behavior while making the type more transparent.

All five methods from ISessionManager are implemented (create, ping, refresh, verify, findOneById).

♻️ Proposed change
         const id = (session.id as string) || randomUUID();
+        const id = session.id || randomUUID();
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/server-core/test/unit/core/helpers/fake-session-manager.ts` around lines
13 - 30, Remove the redundant type assertion on session.id inside
FakeSessionManager.create: replace the expression using (session.id as string)
with plain session.id so the id assignment reads like session.id ||
randomUUID(); update the create method in class FakeSessionManager (the vi.fn
async create implementation) to use session.id directly while keeping the rest
of the logic (id, created, sessions.set, return created) unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/server-core/test/unit/core/helpers/fake-oauth2-token-repository.ts`:
- Around line 34-40: The insert mock in fake-oauth2-token-repository can let a
caller-provided jti (even undefined) override the generated ID; update the logic
in the insert function (the vi.fn that builds stored and uses this.byId) so the
generated randomUUID() is used as a fallback instead of being overwritten—e.g.,
compute stored so the payload is spread first and then jti defaults to
randomUUID() or explicitly set jti = payload.jti ?? randomUUID(); keep the
existing check on stored.jti and byId.set(stored.jti, stored).

---

Nitpick comments:
In `@apps/server-core/test/unit/core/entities/user/service.spec.ts`:
- Around line 57-74: Promote the local createSelfActor test helper into the
shared fake-actor.ts by exporting a createSelfActor(userId: string, options?: {
userName?: string; realmId?: string; realmName?: string }) function; keep the
existing structure (FakePermissionEvaluator, IdentityType.USER, User with
id/name, realm_id and realm object) but replace hard-coded 'test-realm' with
options.realmName || 'test-realm' and use options.realmId || randomUUID(); then
update tests (including this spec) to import the shared createSelfActor instead
of the inline function to ensure consistency across entity service specs.

In
`@apps/server-core/test/unit/core/helpers/fake-identity-permission-provider.ts`:
- Around line 34-48: The three methods on FakeIdentityPermissionProvider
(getFor, isSuperset, resolveJunctionPolicy) are plain async functions which
prevents test spies from asserting calls; wrap each method with vitest spies
(vi.fn) and import { vi } from 'vitest'. Replace the plain methods by assigning
getFor = vi.fn(async (_identity: IdentityPolicyData) => this.bindings),
isSuperset = vi.fn(async (_parent, _child) => this.supersetResult) and
resolveJunctionPolicy = vi.fn(async (_identity, _options) =>
this.junctionPolicy) so tests can assert call counts and args while preserving
existing return behavior.

In `@apps/server-core/test/unit/core/helpers/fake-permission-evaluator.ts`:
- Around line 21-65: Add a small helper on FakePermissionEvaluator to reset
behavior to a permissive no-op (e.g. allowAll() or reset()) so tests can undo
prior deny() calls without using setBehavior directly; implement it to set
this.behavior = () => Promise.resolve() (or () => {} if synchronous) and export
the method alongside existing methods (FakePermissionEvaluator.allowAll / reset)
so callers can call it to clear layered denies created by deny() and restore
default permissive behavior.

In `@apps/server-core/test/unit/core/helpers/fake-session-manager.ts`:
- Around line 13-30: Remove the redundant type assertion on session.id inside
FakeSessionManager.create: replace the expression using (session.id as string)
with plain session.id so the id assignment reads like session.id ||
randomUUID(); update the create method in class FakeSessionManager (the vi.fn
async create implementation) to use session.id directly while keeping the rest
of the logic (id, created, sessions.set, return created) unchanged.

In `@apps/server-core/test/unit/core/identity/password-recovery/service.spec.ts`:
- Around line 126-128: The subject assertion in the password-recovery test is
coupled to English text; instead of
expect(mailClient.sent[0].subject).toContain('Reset') update the assertion to
use a stable marker such as checking the mail record metadata or structure
(e.g., assert mailClient.sent[0] contains a template identifier or header field
if available), or at minimum assert the subject is a non-empty string and that
the recipient matches (keep expect(mailClient.sent).toHaveLength(1) and
expect(mailClient.sent[0]).toMatchObject({ to: email })); locate references to
mailClient.sent and the subject assertion in the test and replace the
language-dependent check with a template/header or non-empty subject assertion.

In `@apps/server-core/test/unit/core/identity/registration/service.spec.ts`:
- Around line 118-120: The test currently asserts a locale-dependent subject
string by checking mailClient.sent[0].subject contains 'Activation'; update the
assertion to avoid i18n coupling by asserting the recipient and that a subject
exists (e.g., expect(mailClient.sent[0]).toMatchObject({ to: data.email }) and
expect(mailClient.sent[0].subject).toBeTruthy()) or, if the mail system provides
a stable template identifier, assert that identifier instead (check
mailClient.sent[0].templateId or similar). Ensure you modify the assertions
referencing mailClient.sent and data.email in the registration service test to
use subject existence or templateId rather than the hard-coded 'Activation'
substring.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8806d551-d3cc-4f79-88e2-dcc9ea31112c

📥 Commits

Reviewing files that changed from the base of the PR and between 8f9326e and befd59a.

📒 Files selected for processing (39)
  • apps/server-core/test/unit/core/entities/client-permission/service.spec.ts
  • apps/server-core/test/unit/core/entities/client-role/service.spec.ts
  • apps/server-core/test/unit/core/entities/client-scope/service.spec.ts
  • apps/server-core/test/unit/core/entities/client/service.spec.ts
  • apps/server-core/test/unit/core/entities/identity-provider-role-mapping/service.spec.ts
  • apps/server-core/test/unit/core/entities/permission-policy/service.spec.ts
  • apps/server-core/test/unit/core/entities/permission/service.spec.ts
  • apps/server-core/test/unit/core/entities/realm/service.spec.ts
  • apps/server-core/test/unit/core/entities/robot-permission/service.spec.ts
  • apps/server-core/test/unit/core/entities/robot-role/service.spec.ts
  • apps/server-core/test/unit/core/entities/robot/service.spec.ts
  • apps/server-core/test/unit/core/entities/role-attribute/service.spec.ts
  • apps/server-core/test/unit/core/entities/role-permission/service.spec.ts
  • apps/server-core/test/unit/core/entities/role/service.spec.ts
  • apps/server-core/test/unit/core/entities/scope/service.spec.ts
  • apps/server-core/test/unit/core/entities/user-attribute/service.spec.ts
  • apps/server-core/test/unit/core/entities/user-permission/service.spec.ts
  • apps/server-core/test/unit/core/entities/user-role/service.spec.ts
  • apps/server-core/test/unit/core/entities/user/service.spec.ts
  • apps/server-core/test/unit/core/helpers/fake-actor.ts
  • apps/server-core/test/unit/core/helpers/fake-identity-permission-provider.ts
  • apps/server-core/test/unit/core/helpers/fake-identity-resolver.ts
  • apps/server-core/test/unit/core/helpers/fake-identity-role-provider.ts
  • apps/server-core/test/unit/core/helpers/fake-mail-client.ts
  • apps/server-core/test/unit/core/helpers/fake-oauth2-key-repository.ts
  • apps/server-core/test/unit/core/helpers/fake-oauth2-token-issuer.ts
  • apps/server-core/test/unit/core/helpers/fake-oauth2-token-repository.ts
  • apps/server-core/test/unit/core/helpers/fake-oauth2-token-signer.ts
  • apps/server-core/test/unit/core/helpers/fake-permission-evaluator.ts
  • apps/server-core/test/unit/core/helpers/fake-session-manager.ts
  • apps/server-core/test/unit/core/helpers/index.ts
  • apps/server-core/test/unit/core/helpers/mock-actor.ts
  • apps/server-core/test/unit/core/identity/password-recovery/service.spec.ts
  • apps/server-core/test/unit/core/identity/registration/service.spec.ts
  • apps/server-core/test/unit/core/oauth2/grant-types/identity.spec.ts
  • apps/server-core/test/unit/core/oauth2/token/issuer/access/module.spec.ts
  • apps/server-core/test/unit/core/oauth2/token/issuer/open-id/module.spec.ts
  • apps/server-core/test/unit/core/oauth2/token/signer/module.spec.ts
  • apps/server-core/test/unit/core/oauth2/token/verifier/module.spec.ts
💤 Files with no reviewable changes (1)
  • apps/server-core/test/unit/core/helpers/mock-actor.ts

@tada5hi

tada5hi commented Apr 25, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Apr 25, 2026

Copy link
Copy Markdown
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@tada5hi

tada5hi commented Apr 26, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Apr 26, 2026

Copy link
Copy Markdown
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (6)
apps/server-core/test/unit/core/helpers/fake-oauth2-token-issuer.ts (1)

22-31: Optional: record a defensive copy and drop the redundant cast.

issueCalls.push(input) stores the caller's reference, so any later mutation of the payload by code under test (or by the spread on Line 26) is visible in the recorded call. Capturing { ...input } avoids that subtle coupling. The as OAuth2TokenPayload cast on Line 29 is also redundant since the object literal already satisfies the type.

♻️ Proposed refactor
     async issue(input: OAuth2TokenPayload): Promise<OAuth2TokenIssuerResponse> {
-        this.issueCalls.push(input);
+        this.issueCalls.push({ ...input });
         const jti = randomUUID();
         const payload: OAuth2TokenPayload = {
             ...input,
             jti,
             exp: this.exp,
-        } as OAuth2TokenPayload;
+        };
         return [`signed-token-${jti}`, payload];
     }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/server-core/test/unit/core/helpers/fake-oauth2-token-issuer.ts` around
lines 22 - 31, The test helper's issue method records the caller's object
reference and uses an unnecessary type cast; change issueCalls.push(input) to
push a defensive copy (e.g., issueCalls.push({ ...input })) and build the
payload with a plain object literal (const payload = { ...input, jti, exp:
this.exp }) removing the redundant "as OAuth2TokenPayload" cast so the recorded
call is decoupled from later mutations and the code is type-clean.
apps/server-core/test/unit/core/helpers/fake-identity-resolver.ts (1)

24-31: Optional: omit realmKey from recorded calls when not supplied.

Currently every recorded entry carries realmKey: undefined even when the caller didn’t pass one. It’s harmless with Vitest deep-equality, but slightly noisier than necessary if anyone snapshots resolveCalls or compares with strict equality.

♻️ Suggested tweak
-    async resolve(type: `${IdentityType}`, key: string, realmKey?: string): Promise<Identity | null> {
-        this.resolveCalls.push({
-            type, 
-            key, 
-            realmKey, 
-        });
-        return this.identity;
-    }
+    async resolve(type: `${IdentityType}`, key: string, realmKey?: string): Promise<Identity | null> {
+        this.resolveCalls.push({
+            type,
+            key,
+            ...(realmKey !== undefined ? { realmKey } : {}),
+        });
+        return this.identity;
+    }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/server-core/test/unit/core/helpers/fake-identity-resolver.ts` around
lines 24 - 31, The resolve method in FakeIdentityResolver is always recording
realmKey as undefined; change the recording logic in resolve (method name:
resolve, class/file: fake-identity-resolver.ts) to only include realmKey in the
pushed object when the caller supplied it (i.e., omit the realmKey property if
realmKey is undefined), so resolveCalls entries contain realmKey only when
provided.
apps/server-core/test/unit/core/oauth2/token/issuer/open-id/module.spec.ts (1)

67-74: Optional: drop the unused setIdentity in the missing-claims test.

Both issue(...) calls here should fail validation before identity resolution is attempted, so configuring the resolver with an identity is misleading — readers may think the resolver path is exercised. You can also use the default resolver from createIssuer() and skip the local instance entirely.

♻️ Suggested cleanup
         it('should throw when sub_kind or sub is missing', async () => {
-            const resolver = new FakeIdentityResolver();
-            resolver.setIdentity(identity);
-            const issuer = createIssuer({ identityResolver: resolver });
+            const issuer = createIssuer();

             await expect(issuer.issue({ sub: userId } as OAuth2TokenPayload)).rejects.toThrow(JWTError);
             await expect(issuer.issue({ sub_kind: OAuth2SubKind.USER } as OAuth2TokenPayload)).rejects.toThrow(JWTError);
         });
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/server-core/test/unit/core/oauth2/token/issuer/open-id/module.spec.ts`
around lines 67 - 74, Remove the misleading resolver setup in the test "should
throw when sub_kind or sub is missing": don't instantiate FakeIdentityResolver
or call resolver.setIdentity(identity); instead use the default resolver
returned by createIssuer() (i.e., just call createIssuer() without passing
identityResolver) and then call issuer.issue(...) for both invalid payloads so
the failure is clearly due to validation before identity resolution; update
assertions to still expect JWTError from issuer.issue when sub or sub_kind is
missing.
apps/server-core/test/unit/core/helpers/fake-permission-evaluator.ts (1)

21-71: Optional: store call snapshots and consider an undo path for deny.

Two minor observations on the fake:

  • The *Calls arrays store the ctx by reference. As long as services treat PermissionEvaluationContext as immutable (which appears to be the case today), toContainEqual(...) assertions are stable. If a service ever mutates the context after invoking the evaluator, recorded entries would silently change. A defensive { ...ctx } (or structured clone) would harden the fake against that future risk.
  • deny(method, error) wraps the previous behavior in a closure but provides no way to roll back to the prior behavior. Combined with denyAll (which replaces the chain entirely), the only way to "undo" a deny is to call setBehavior(...) again. Consider exposing a reset() (clears behavior to no-op and clears the *Calls arrays) for ergonomics in longer test setups.

Both are nice-to-haves; current per-test actor instantiation avoids any cross-test bleed.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/server-core/test/unit/core/helpers/fake-permission-evaluator.ts` around
lines 21 - 71, The fake currently stores PermissionEvaluationContext objects by
reference and has no convenient undo for behavioral changes; update each place
that pushes contexts (evaluate, evaluateOneOf, preEvaluate, preEvaluateOneOf) to
push a shallow-cloned snapshot of ctx (e.g., { ...ctx } or structured clone)
instead of the original object, and add a reset() method that clears
evaluateCalls/evaluateOneOfCalls/preEvaluateCalls/preEvaluateOneOfCalls and
restores behavior to the default noop (same as the constructor's default
EvaluatorBehavior) so tests can cleanly reset the fake without calling
setBehavior manually; keep deny and denyAll behavior intact.
apps/server-core/test/unit/core/entities/user-role/service.spec.ts (1)

31-37: Same unused outer-scope identityPermissionProvider as in robot-role/service.spec.ts.

The closure-scoped identityPermissionProvider is never read after assignment — the superset test instantiates its own identityPermissionProviderDeny. Consider inlining the construction inside the service factory call to drop the unused binding.

♻️ Suggested simplification
-    let identityPermissionProvider: FakeIdentityPermissionProvider;
-
     beforeEach(() => {
         repository = new FakeEntityRepository<UserRole>();
-        identityPermissionProvider = new FakeIdentityPermissionProvider();
-        service = new UserRoleService({ repository, identityPermissionProvider });
+        service = new UserRoleService({
+            repository,
+            identityPermissionProvider: new FakeIdentityPermissionProvider(),
+        });
     });
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/server-core/test/unit/core/entities/user-role/service.spec.ts` around
lines 31 - 37, The outer-scope variable identityPermissionProvider (type
FakeIdentityPermissionProvider) is assigned but never used; replace the separate
binding by inlining new FakeIdentityPermissionProvider() into the
UserRoleService constructor (where service = new UserRoleService({ repository,
identityPermissionProvider })) and remove the unused identityPermissionProvider
declaration so tests only create the provider instance where needed (the
superset test can continue to instantiate identityPermissionProviderDeny as
before).
apps/server-core/test/unit/core/entities/robot-role/service.spec.ts (1)

31-37: Outer-scope identityPermissionProvider is assigned but never read.

After the refactor, the closure-scoped identityPermissionProvider is only written in beforeEach and passed into the service constructor; no test reads it back (the superset-denial test creates its own identityPermissionProviderDeny). You can drop the outer let and inline the instance to reduce noise.

♻️ Suggested simplification
-    let identityPermissionProvider: FakeIdentityPermissionProvider;
-
     beforeEach(() => {
         repository = new FakeEntityRepository<RobotRole>();
-        identityPermissionProvider = new FakeIdentityPermissionProvider();
-        service = new RobotRoleService({ repository, identityPermissionProvider });
+        service = new RobotRoleService({
+            repository,
+            identityPermissionProvider: new FakeIdentityPermissionProvider(),
+        });
     });
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/server-core/test/unit/core/entities/robot-role/service.spec.ts` around
lines 31 - 37, The outer-scope variable identityPermissionProvider is assigned
in beforeEach but never read; remove the top-level declaration and inline new
FakeIdentityPermissionProvider() when constructing the RobotRoleService in
beforeEach (replace identityPermissionProvider with a direct new
FakeIdentityPermissionProvider() in the RobotRoleService call), leaving other
tests that create their own identityPermissionProviderDeny untouched; update any
references in beforeEach to use the inlined instance and delete the unused
identityPermissionProvider declaration.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@apps/server-core/test/unit/core/entities/robot-role/service.spec.ts`:
- Around line 31-37: The outer-scope variable identityPermissionProvider is
assigned in beforeEach but never read; remove the top-level declaration and
inline new FakeIdentityPermissionProvider() when constructing the
RobotRoleService in beforeEach (replace identityPermissionProvider with a direct
new FakeIdentityPermissionProvider() in the RobotRoleService call), leaving
other tests that create their own identityPermissionProviderDeny untouched;
update any references in beforeEach to use the inlined instance and delete the
unused identityPermissionProvider declaration.

In `@apps/server-core/test/unit/core/entities/user-role/service.spec.ts`:
- Around line 31-37: The outer-scope variable identityPermissionProvider (type
FakeIdentityPermissionProvider) is assigned but never used; replace the separate
binding by inlining new FakeIdentityPermissionProvider() into the
UserRoleService constructor (where service = new UserRoleService({ repository,
identityPermissionProvider })) and remove the unused identityPermissionProvider
declaration so tests only create the provider instance where needed (the
superset test can continue to instantiate identityPermissionProviderDeny as
before).

In `@apps/server-core/test/unit/core/helpers/fake-identity-resolver.ts`:
- Around line 24-31: The resolve method in FakeIdentityResolver is always
recording realmKey as undefined; change the recording logic in resolve (method
name: resolve, class/file: fake-identity-resolver.ts) to only include realmKey
in the pushed object when the caller supplied it (i.e., omit the realmKey
property if realmKey is undefined), so resolveCalls entries contain realmKey
only when provided.

In `@apps/server-core/test/unit/core/helpers/fake-oauth2-token-issuer.ts`:
- Around line 22-31: The test helper's issue method records the caller's object
reference and uses an unnecessary type cast; change issueCalls.push(input) to
push a defensive copy (e.g., issueCalls.push({ ...input })) and build the
payload with a plain object literal (const payload = { ...input, jti, exp:
this.exp }) removing the redundant "as OAuth2TokenPayload" cast so the recorded
call is decoupled from later mutations and the code is type-clean.

In `@apps/server-core/test/unit/core/helpers/fake-permission-evaluator.ts`:
- Around line 21-71: The fake currently stores PermissionEvaluationContext
objects by reference and has no convenient undo for behavioral changes; update
each place that pushes contexts (evaluate, evaluateOneOf, preEvaluate,
preEvaluateOneOf) to push a shallow-cloned snapshot of ctx (e.g., { ...ctx } or
structured clone) instead of the original object, and add a reset() method that
clears evaluateCalls/evaluateOneOfCalls/preEvaluateCalls/preEvaluateOneOfCalls
and restores behavior to the default noop (same as the constructor's default
EvaluatorBehavior) so tests can cleanly reset the fake without calling
setBehavior manually; keep deny and denyAll behavior intact.

In `@apps/server-core/test/unit/core/oauth2/token/issuer/open-id/module.spec.ts`:
- Around line 67-74: Remove the misleading resolver setup in the test "should
throw when sub_kind or sub is missing": don't instantiate FakeIdentityResolver
or call resolver.setIdentity(identity); instead use the default resolver
returned by createIssuer() (i.e., just call createIssuer() without passing
identityResolver) and then call issuer.issue(...) for both invalid payloads so
the failure is clearly due to validation before identity resolution; update
assertions to still expect JWTError from issuer.issue when sub or sub_kind is
missing.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9bc46f22-9bd2-4c9c-a79b-85a8b7816ed4

📥 Commits

Reviewing files that changed from the base of the PR and between befd59a and e2a56ce.

📒 Files selected for processing (31)
  • apps/server-core/test/unit/core/entities/client-permission/service.spec.ts
  • apps/server-core/test/unit/core/entities/client-role/service.spec.ts
  • apps/server-core/test/unit/core/entities/client-scope/service.spec.ts
  • apps/server-core/test/unit/core/entities/client/service.spec.ts
  • apps/server-core/test/unit/core/entities/identity-provider-role-mapping/service.spec.ts
  • apps/server-core/test/unit/core/entities/permission-policy/service.spec.ts
  • apps/server-core/test/unit/core/entities/permission/service.spec.ts
  • apps/server-core/test/unit/core/entities/realm/service.spec.ts
  • apps/server-core/test/unit/core/entities/robot-permission/service.spec.ts
  • apps/server-core/test/unit/core/entities/robot-role/service.spec.ts
  • apps/server-core/test/unit/core/entities/robot/service.spec.ts
  • apps/server-core/test/unit/core/entities/role-attribute/service.spec.ts
  • apps/server-core/test/unit/core/entities/role-permission/service.spec.ts
  • apps/server-core/test/unit/core/entities/role/service.spec.ts
  • apps/server-core/test/unit/core/entities/scope/service.spec.ts
  • apps/server-core/test/unit/core/entities/user-attribute/service.spec.ts
  • apps/server-core/test/unit/core/entities/user-permission/service.spec.ts
  • apps/server-core/test/unit/core/entities/user-role/service.spec.ts
  • apps/server-core/test/unit/core/entities/user/service.spec.ts
  • apps/server-core/test/unit/core/helpers/fake-identity-resolver.ts
  • apps/server-core/test/unit/core/helpers/fake-identity-role-provider.ts
  • apps/server-core/test/unit/core/helpers/fake-oauth2-key-repository.ts
  • apps/server-core/test/unit/core/helpers/fake-oauth2-token-issuer.ts
  • apps/server-core/test/unit/core/helpers/fake-oauth2-token-repository.ts
  • apps/server-core/test/unit/core/helpers/fake-oauth2-token-signer.ts
  • apps/server-core/test/unit/core/helpers/fake-permission-evaluator.ts
  • apps/server-core/test/unit/core/helpers/fake-session-manager.ts
  • apps/server-core/test/unit/core/oauth2/grant-types/identity.spec.ts
  • apps/server-core/test/unit/core/oauth2/token/issuer/access/module.spec.ts
  • apps/server-core/test/unit/core/oauth2/token/issuer/open-id/module.spec.ts
  • apps/server-core/test/unit/core/oauth2/token/verifier/module.spec.ts
✅ Files skipped from review due to trivial changes (3)
  • apps/server-core/test/unit/core/helpers/fake-identity-role-provider.ts
  • apps/server-core/test/unit/core/helpers/fake-session-manager.ts
  • apps/server-core/test/unit/core/entities/user/service.spec.ts
🚧 Files skipped from review as they are similar to previous changes (13)
  • apps/server-core/test/unit/core/helpers/fake-oauth2-token-signer.ts
  • apps/server-core/test/unit/core/entities/permission-policy/service.spec.ts
  • apps/server-core/test/unit/core/entities/user-permission/service.spec.ts
  • apps/server-core/test/unit/core/entities/role/service.spec.ts
  • apps/server-core/test/unit/core/entities/client/service.spec.ts
  • apps/server-core/test/unit/core/oauth2/grant-types/identity.spec.ts
  • apps/server-core/test/unit/core/entities/client-permission/service.spec.ts
  • apps/server-core/test/unit/core/entities/client-role/service.spec.ts
  • apps/server-core/test/unit/core/helpers/fake-oauth2-token-repository.ts
  • apps/server-core/test/unit/core/entities/robot/service.spec.ts
  • apps/server-core/test/unit/core/entities/identity-provider-role-mapping/service.spec.ts
  • apps/server-core/test/unit/core/oauth2/token/issuer/access/module.spec.ts
  • apps/server-core/test/unit/core/oauth2/token/verifier/module.spec.ts

@tada5hi
tada5hi merged commit d8bbd6a into master Apr 26, 2026
1 check passed
@tada5hi
tada5hi deleted the refactor/test-fakes-over-mocks branch April 26, 2026 14:26
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