• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

safe-global / safe-client-gateway / 7248352591

18 Dec 2023 11:44AM UTC coverage: 89.848% (+0.008%) from 89.84%
7248352591

push

github

web-flow
refactor: create `IEncoder` for transaction/event mocking (#921)

This adds a new `EncoderBuilder` class for creating mock transaction/event data for testing.

* refactor: create `IEncoder` for encoding mocking

* fix: change `constructor` to `protected` + rename to `EncoderBuilder`

* fix: test

1413 of 1696 branches covered (0.0%)

Branch coverage included in aggregate %.

47 of 48 new or added lines in 5 files covered. (97.92%)

3 existing lines in 1 file now uncovered.

5304 of 5780 relevant lines covered (91.76%)

144.01 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

75.0
/src/__tests__/encoder-builder.ts
1
import { Hex } from 'viem';
2

3
import { Builder, IBuilder } from '@/__tests__/builder';
8✔
4

5
export interface IEncoderBuilder<T, E = Hex> extends IBuilder<T> {
6
  encode(): E;
7
}
8

9
export class EncoderBuilder<T, E = Hex>
8✔
10
  extends Builder<T>
11
  implements IEncoderBuilder<T, E>
12
{
13
  encode(): E {
NEW
14
    throw new Error('Method not implemented.');
×
15
  }
16

17
  public static new<T, E = Hex>() {
18
    return new this<T, E>({});
26✔
19
  }
20
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc