We have a lot of duplicated mocks of the polkadot-api library. It should be refactored into a test utility library of its own.
Also the polkadot-api logging can be really annoying; move this code into test setup:
jest.mock('@polkadot/util/cjs/logger', () => ({
logger: () => ({
debug: jest.fn(),
error: jest.fn(),
log: jest.fn(),
warn: jest.fn(),
noop: jest.fn(),
}),
loggerFormat: jest.fn((v) => v),
}));