Skip to content

Commit 2b9a427

Browse files
authored
fix: remove aptos unit test for function assertions (LedgerHQ#8839)
* fix: aptos e2e test with speculos * fix: aptos bridge integration test * fix: remove tobe(function) assertions * fix: remove tobe(function) assertions from ledger account tests * chore: rollback changes * chore: rollback changes * test: add unit tests for currencyBridge methods * fix: bridge test * fix: bridge test
1 parent e785a43 commit 2b9a427

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

libs/ledger-live-common/src/families/aptos/LedgerAccount.test.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,15 @@ describe("LedgerAccount Test", () => {
1212

1313
it("builds the client properly", () => {
1414
expect(LedgerAccount.fromLedgerConnection).toBeDefined();
15-
expect(typeof LedgerAccount.fromLedgerConnection).toBe("function");
1615
expect(account.init).toBeDefined();
17-
expect(typeof account.init).toBe("function");
1816
expect(account.toAptosAccount).toBeDefined();
19-
expect(typeof account.toAptosAccount).toBe("function");
2017
expect(account.hdWalletPath).toBeDefined();
21-
expect(typeof account.hdWalletPath).toBe("function");
2218
expect(account.address).toBeDefined();
23-
expect(typeof account.address).toBe("function");
2419
expect(account.authKey).toBeDefined();
25-
expect(typeof account.authKey).toBe("function");
2620
expect(account.pubKey).toBeDefined();
27-
expect(typeof account.pubKey).toBe("function");
2821
expect(account.asyncSignBuffer).toBeDefined();
29-
expect(typeof account.asyncSignBuffer).toBe("function");
3022
expect(account.asyncSignHexString).toBeDefined();
31-
expect(typeof account.asyncSignHexString).toBe("function");
3223
expect(account.signTransaction).toBeDefined();
33-
expect(typeof account.signTransaction).toBe("function");
3424

3525
expect(mockedLedgerAccount).toHaveBeenCalledTimes(1);
3626
});

libs/ledger-live-common/src/families/aptos/bridge/js.test.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ describe("Aptos bridge interface ", () => {
3333
});
3434
});
3535

36-
describe("accountBridge ", () => {
36+
describe("accountBridge", () => {
3737
it("should contain all methods", () => {
3838
expect(bridge.accountBridge.estimateMaxSpendable).toBeDefined();
3939
expect(typeof bridge.accountBridge.estimateMaxSpendable).toBe("function");
@@ -53,8 +53,15 @@ describe("Aptos bridge interface ", () => {
5353
expect(typeof bridge.accountBridge.signOperation).toBe("function");
5454
expect(bridge.accountBridge.broadcast).toBeDefined();
5555
expect(typeof bridge.accountBridge.broadcast).toBe("function");
56+
expect(bridge.currencyBridge.hydrate).toBeDefined();
57+
expect(typeof bridge.currencyBridge.hydrate).toBe("function");
58+
expect(bridge.currencyBridge.preload).toBeDefined();
59+
expect(typeof bridge.currencyBridge.preload).toBe("function");
60+
expect(bridge.currencyBridge.scanAccounts).toBeDefined();
61+
expect(typeof bridge.currencyBridge.scanAccounts).toBe("function");
5662
});
5763
});
64+
5865
describe("updateTransaction", () => {
5966
it("should update the transaction with the given patch", () => {
6067
const initialTransaction = {

0 commit comments

Comments
 (0)