Skip to content

Commit

Permalink
added force exit to
Browse files Browse the repository at this point in the history
  • Loading branch information
dsawali committed Jul 22, 2024
1 parent 9d60dac commit 3fd3b27
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/taquito-beacon-wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"node": ">=18"
},
"scripts": {
"test": "jest --coverage",
"test": "jest --coverage --forceExit",
"test:watch": "jest --coverage --watch",
"test:prod": "npm run lint && npm run test -- --no-cache",
"lint": "eslint --ext .js,.ts .",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ describe('Beacon Wallet tests', () => {
it(`Verify that an error is thrown if BeaconWallet is initialized with an empty object`, async () => {
try {
const wallet = new BeaconWallet({} as any);
expect(wallet).toBeDefined();
expect(await wallet).toBeDefined();
} catch (e) {
console.log('hello there', e);
expect((e as any).message).toEqual('Name not set');
}
});
Expand Down Expand Up @@ -88,25 +89,25 @@ describe('Beacon Wallet tests', () => {

it('Verify getSigningType returns correct signing type for undefined', async () => {
const wallet = new BeaconWallet({ name: 'Test', storage: new LocalStorage() });
const signingType = wallet['getSigningType'](undefined);
const signingType = await wallet['getSigningType'](undefined);
expect(signingType).toBe(SigningType.RAW);
});

it('Verify getSigningType returns correct signing type for an empty array', async () => {
const wallet = new BeaconWallet({ name: 'Test', storage: new LocalStorage() });
const signingType = wallet['getSigningType'](new Uint8Array([]));
const signingType = await wallet['getSigningType'](new Uint8Array([]));
expect(signingType).toBe(SigningType.RAW);
});

it('Verify getSigningType returns correct signing type for 3', async () => {
const wallet = new BeaconWallet({ name: 'Test', storage: new LocalStorage() });
const signingType = wallet['getSigningType'](new Uint8Array([3]));
const signingType = await wallet['getSigningType'](new Uint8Array([3]));
expect(signingType).toBe(SigningType.OPERATION);
});

it('Verify getSigningType returns correct signing type for 5', async () => {
const wallet = new BeaconWallet({ name: 'Test', storage: new LocalStorage() });
const signingType = wallet['getSigningType'](new Uint8Array([5]));
const signingType = await wallet['getSigningType'](new Uint8Array([5]));
expect(signingType).toBe(SigningType.MICHELINE);
});

Expand Down

0 comments on commit 3fd3b27

Please sign in to comment.