Skip to content

Commit

Permalink
chore: fix logger test
Browse files Browse the repository at this point in the history
  • Loading branch information
petertonysmith94 committed Dec 20, 2024
1 parent d6063e9 commit 7407977
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions packages/logger/test/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Address } from '@fuel-ts/address';
import { Address } from '@fuel-ts/address';
import { BN } from '@fuel-ts/math';
import debug from 'debug';
import type { MockInstance } from 'vitest';
Expand Down Expand Up @@ -100,16 +100,8 @@ describe('Logger Tests', () => {
});

it('should format Address to bech32 string using formatter c', () => {
const mockAddress: Address = {
toJSON: () => '',
toString: () => '0x000000000000000000000000000000000000000000000000000000000000002a',
toAddress: () => 'fuel1xyzabc123',
toB256: () => '',
toHexString: () => '',
toBytes: () => new Uint8Array(),
equals: () => false,
};
const formatted = debug.formatters.c(mockAddress);
const address = new Address('fuel1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq4qvpkv30');
const formatted = debug.formatters.c(address);
expect(formatted).toBe('fuel1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq4qvpkv30');
});

Expand Down

0 comments on commit 7407977

Please sign in to comment.