Skip to content

Commit

Permalink
Fixed client unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marcvelmer committed Oct 23, 2023
1 parent cb77372 commit f5414e5
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions test/unit/types/client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('Client tests', () => {
it('should have the correct default values for production environment', () => {
const client = new VocdoniSDKClient({ env: EnvOptions.PROD });
expect(client.url).toEqual(API_URL.prod);
expect(client.faucetService.url).toBeUndefined();
expect(client.faucetService.url).toEqual(FAUCET_URL.prod);
expect(client.faucetService.token_limit).toBeUndefined();
expect(client.chainService.txWait.retryTime).toEqual(TX_WAIT_OPTIONS.retry_time);
expect(client.chainService.txWait.attempts).toEqual(TX_WAIT_OPTIONS.attempts);
Expand All @@ -42,12 +42,6 @@ describe('Client tests', () => {
await client.fetchFaucetPayload();
}).rejects.toThrow('No wallet or signer set');
});
it('should throw when trying to fetch tokens from production environment', async () => {
const client = new VocdoniSDKClient({ env: EnvOptions.PROD, wallet: Wallet.createRandom() });
await expect(async () => {
await client.fetchFaucetPayload();
}).rejects.toThrow('No faucet URL');
});
it('should calculate the deterministic wallet based on data', async () => {
const w1 = VocdoniSDKClient.generateWalletFromData('test');
const w2 = VocdoniSDKClient.generateWalletFromData(['test']);
Expand Down

0 comments on commit f5414e5

Please sign in to comment.