Skip to content

Commit

Permalink
chore: added missing type checking
Browse files Browse the repository at this point in the history
  • Loading branch information
petertonysmith94 committed Aug 28, 2024
1 parent 77112c2 commit fa3df98
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/contract/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"compilerOptions": {
"outDir": "./dist"
},
"include": ["src", "src/**/*.json"]
"include": ["src", "src/**/*.json", "test"]
}
5 changes: 4 additions & 1 deletion packages/logger/test/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import type { AbstractAddress } from '@fuel-ts/interfaces';
import { BN } from '@fuel-ts/math';
import debug from 'debug';
import type { MockInstance } from 'vitest';

import { logger, prefixLogger, defaultLogger } from '../src/index';

type Debug = typeof debug;

/**
* @group node
*/
describe('Logger Tests', () => {
let debugSpy;
let debugSpy: MockInstance<Parameters<Debug['log']>, ReturnType<Debug['log']>>;

beforeEach(() => {
debug.enable('test');
Expand Down
4 changes: 2 additions & 2 deletions packages/logger/test/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('truncateWalletAddress Tests', () => {
it('should correctly truncate a wallet address', () => {
const mockAddress: Address = {
toString: () => '0x1234567890abcdef1234567890abcdef',
};
} as Address;
const options = { prefixLength: 6, suffixLength: 4 };
const result = truncateWalletAddress(mockAddress, options);
expect(result).toBe('0x1234…cdef');
Expand All @@ -19,7 +19,7 @@ describe('truncateWalletAddress Tests', () => {
it('should handle default options if none provided', () => {
const mockAddress: Address = {
toString: () => '0x1234567890abcdef1234567890abcdef',
};
} as Address;
const result = truncateWalletAddress(mockAddress);
expect(result).toBe('0x…cdef');
});
Expand Down
2 changes: 1 addition & 1 deletion packages/logger/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"compilerOptions": {
"outDir": "./dist"
},
"include": ["src"]
"include": ["src", "test"]
}
2 changes: 1 addition & 1 deletion packages/utils/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"compilerOptions": {
"outDir": "./dist"
},
"include": ["src"]
"include": ["src", "test"]
}

0 comments on commit fa3df98

Please sign in to comment.