From e495a4dea0f8b54e3e5bf4b0d01c84ba2e1f3c40 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Tue, 18 Jun 2024 17:07:40 +0100 Subject: [PATCH 1/2] fix: added `test-utils` to `@fuel-ts/account` entrypoint --- packages/account/package.json | 2 +- packages/account/src/test-util.test.ts | 16 ++++++++++++++++ packages/account/src/test-utils.ts | 7 +++++++ packages/account/src/test-utils/index.ts | 7 ------- packages/account/tsup.config.ts | 2 +- 5 files changed, 25 insertions(+), 9 deletions(-) create mode 100644 packages/account/src/test-util.test.ts create mode 100644 packages/account/src/test-utils.ts delete mode 100644 packages/account/src/test-utils/index.ts diff --git a/packages/account/package.json b/packages/account/package.json index b3d4018c18d..c44cf835792 100644 --- a/packages/account/package.json +++ b/packages/account/package.json @@ -32,7 +32,7 @@ "./dist/configs.d.ts" ], "test-utils": [ - "./dist/test-utils/index.d.ts" + "./dist/test-utils.d.ts" ] } }, diff --git a/packages/account/src/test-util.test.ts b/packages/account/src/test-util.test.ts new file mode 100644 index 00000000000..6db453677da --- /dev/null +++ b/packages/account/src/test-util.test.ts @@ -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(); + }); +}); diff --git a/packages/account/src/test-utils.ts b/packages/account/src/test-utils.ts new file mode 100644 index 00000000000..2fe217a8783 --- /dev/null +++ b/packages/account/src/test-utils.ts @@ -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'; diff --git a/packages/account/src/test-utils/index.ts b/packages/account/src/test-utils/index.ts deleted file mode 100644 index 6d93d2aa485..00000000000 --- a/packages/account/src/test-utils/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -export * from './generateTestWallet'; -export * from './seedTestWallet'; -export * from './launchNode'; -export * from './setup-test-provider-and-wallets'; -export * from './wallet-config'; -export * from './test-message'; -export * from './asset-id'; diff --git a/packages/account/tsup.config.ts b/packages/account/tsup.config.ts index c6f75100446..aac3b41345a 100644 --- a/packages/account/tsup.config.ts +++ b/packages/account/tsup.config.ts @@ -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 () => { From 1d30b691b612e6dd8210824e3a34a57390ce0c20 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Tue, 18 Jun 2024 17:41:34 +0100 Subject: [PATCH 2/2] chore: changeset --- .changeset/real-rats-count.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/real-rats-count.md diff --git a/.changeset/real-rats-count.md b/.changeset/real-rats-count.md new file mode 100644 index 00000000000..8fbcc7df8be --- /dev/null +++ b/.changeset/real-rats-count.md @@ -0,0 +1,5 @@ +--- +"@fuel-ts/account": patch +--- + +fix: type declarations for `@fuel-ts/account/test-utils`