Skip to content

Refactor polkadot-api mocks into a library #1005

@shannonwells

Description

@shannonwells

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),
}));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions