Skip to content

Commit

Permalink
remove test
Browse files Browse the repository at this point in the history
  • Loading branch information
abdulmth committed Sep 6, 2023
1 parent 68bd398 commit 2641bff
Showing 1 changed file with 0 additions and 47 deletions.
47 changes: 0 additions & 47 deletions bindings/nodejs/tests/wallet/wallet.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,53 +132,6 @@ describe('Wallet', () => {
await recreatedWallet.destroy()
removeDir(storagePath)
}, 20000);

it('error after destroy', async () => {
let storagePath = 'test-error-after-destroy';
removeDir(storagePath);

const walletOptions = {
storagePath,
clientOptions: {
nodes: ['https://api.testnet.shimmer.network'],
},
coinType: CoinType.Shimmer,
secretManager: {
stronghold: {
snapshotPath: `./${storagePath}/wallet.stronghold`,
password: `A12345678*`,
},
},
};

const wallet = new Wallet(walletOptions);
await wallet.storeMnemonic(
'vital give early extra blind skin eight discover scissors there globe deal goat fat load robot return rate fragile recycle select live ordinary claim',
);

const account = await wallet.createAccount({
alias: 'Alice',
});

expect(account.getMetadata().index).toStrictEqual(0);

await wallet.destroy();

try {
const accounts = await wallet.getAccounts();
throw 'Should return an error because the wallet got destroyed';
} catch (err: any) {
expect(err).toContain('Wallet got destroyed');
}

try {
const client = await wallet.getClient();
throw 'Should return an error because the wallet got destroyed';
} catch (err: any) {
expect(err).toContain('Wallet got destroyed');
}
removeDir(storagePath)
}, 35000);
})

function removeDir(storagePath: string) {
Expand Down

0 comments on commit 2641bff

Please sign in to comment.