Skip to content

Commit a0fa73d

Browse files
az108claude
andcommitted
Test: Assert the site name sync re-emits exactly once
Review feedback: the positive assertion had no call count, so a second re-emission would have gone unnoticed. It now uses toHaveBeenCalledExactlyOnceWith. The negative case keeps not.toHaveBeenCalled, where a count would not add anything. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent eb9331d commit a0fa73d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/test/webapp/app/shared/language/site-name-translation-sync.service.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ describe('SiteNameTranslationSync', () => {
2828
siteConfig.siteName.set('New Portal');
2929
TestBed.tick();
3030

31-
expect(setTranslation).toHaveBeenCalledWith('en', {}, true);
31+
expect(setTranslation).toHaveBeenCalledExactlyOnceWith('en', {}, true);
3232
});
3333

3434
it('should do nothing when no language is active yet', () => {

0 commit comments

Comments
 (0)