Skip to content

Commit

Permalink
fix: type declarations for @fuel-ts/account/test-utils (#2548)
Browse files Browse the repository at this point in the history
* fix: added `test-utils` to `@fuel-ts/account` entrypoint

* chore: changeset
  • Loading branch information
petertonysmith94 authored Jun 19, 2024
1 parent 20f8c89 commit 038d1f1
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/real-rats-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@fuel-ts/account": patch
---

fix: type declarations for `@fuel-ts/account/test-utils`
2 changes: 1 addition & 1 deletion packages/account/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"./dist/configs.d.ts"
],
"test-utils": [
"./dist/test-utils/index.d.ts"
"./dist/test-utils.d.ts"
]
}
},
Expand Down
16 changes: 16 additions & 0 deletions packages/account/src/test-util.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import * as testUtilsMod from './test-utils';

/**
* @group node
*/
describe('test-utils.js', () => {
test('should export all test utilities', () => {
expect(testUtilsMod.generateTestWallet).toBeTruthy();
expect(testUtilsMod.seedTestWallet).toBeTruthy();
expect(testUtilsMod.launchNode).toBeTruthy();
expect(testUtilsMod.setupTestProviderAndWallets).toBeTruthy();
expect(testUtilsMod.WalletsConfig).toBeTruthy();
expect(testUtilsMod.TestMessage).toBeTruthy();
expect(testUtilsMod.AssetId).toBeTruthy();
});
});
7 changes: 7 additions & 0 deletions packages/account/src/test-utils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export * from './test-utils/generateTestWallet';
export * from './test-utils/seedTestWallet';
export * from './test-utils/launchNode';
export * from './test-utils/setup-test-provider-and-wallets';
export * from './test-utils/wallet-config';
export * from './test-utils/test-message';
export * from './test-utils/asset-id';
7 changes: 0 additions & 7 deletions packages/account/src/test-utils/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/account/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const configs: Options = {
entry: {
index: 'src/index.ts',
configs: 'src/configs.ts',
'test-utils': 'src/test-utils/index.ts',
'test-utils': 'src/test-utils.ts',
},
// eslint-disable-next-line @typescript-eslint/require-await
onSuccess: async () => {
Expand Down

0 comments on commit 038d1f1

Please sign in to comment.