refactor(core): remove legacy plebbit terminology

This commit is contained in:
Tommaso Casaburi
2026-04-17 10:48:27 +07:00
parent e366dac25c
commit ee7a5b5778
158 changed files with 626 additions and 836 deletions
@@ -26,14 +26,14 @@ describe('challenge-utils', () => {
challengeSuccess: false,
reason: 'try again later',
} as never,
{ subplebbitAddress: 'business-and-finance.bso' },
{ communityAddress: 'business-and-finance.bso' },
);
expect(warnSpy).toHaveBeenCalledWith(
'Challenge Verification Failed:',
expect.objectContaining({ challengeSuccess: false }),
'Publication:',
expect.objectContaining({ subplebbitAddress: 'business-and-finance.bso' }),
expect.objectContaining({ communityAddress: 'business-and-finance.bso' }),
);
expect(alertMock).toHaveBeenCalledWith('Error from /biz/: invalid captcha try again later');
});
@@ -44,13 +44,13 @@ describe('challenge-utils', () => {
challengeErrors: ['first error', 'second error'],
challengeSuccess: false,
} as never,
{ subplebbitAddress: 'unknown-board.eth' },
{ communityAddress: 'unknown-board.eth' },
);
expect(alertMock).toHaveBeenCalledWith('Error from unknown-board.eth: first error second error');
});
it('uses communityAddress when the upgraded publication no longer exposes subplebbitAddress', () => {
it('uses communityAddress when the upgraded publication no longer exposes communityAddress', () => {
alertChallengeVerificationFailed(
{
challengeErrors: ['first error'],
@@ -76,7 +76,7 @@ describe('challenge-utils', () => {
});
it('logs successful challenge verification instead of alerting', () => {
alertChallengeVerificationFailed({ challengeSuccess: true } as never, { subplebbitAddress: 'business-and-finance.bso' });
alertChallengeVerificationFailed({ challengeSuccess: true } as never, { communityAddress: 'business-and-finance.bso' });
expect(logSpy).toHaveBeenCalledWith('Challenge verification succeeded:', expect.objectContaining({ challengeSuccess: true }));
expect(alertMock).not.toHaveBeenCalled();