Skip to content

Commit

Permalink
test(simulator): Added tests for all modules except device and exchan…
Browse files Browse the repository at this point in the history
…ge (#259)

* test(simulator): Added tests for all modules except device and exchange

* test(simulator): Improving readability

* test(simulator): Factorizing profiles

* test(simulator): Fixed account tests

* test(simulator): Fixed currency tests

* test(simulator): Fixed Message tests

* test(simulator): All tests passing except Storage

* fix: store usage on storage module and timeout issue

* Update packages/simulator/tests/server.spec.ts

---------

Co-authored-by: Kant <[email protected]>
  • Loading branch information
ComradeAERGO and Justkant authored Oct 31, 2023
1 parent b5b0aae commit 9f2b1be
Show file tree
Hide file tree
Showing 3 changed files with 354 additions and 17 deletions.
4 changes: 2 additions & 2 deletions packages/simulator/src/transport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function getSimulatorTransport(
const serverTransport: Transport = {
onMessage: undefined,
send: (payload) => {
console.log("wallet -> app", payload);
console.info("wallet -> app", payload);
if (clientTransport?.onMessage) {
clientTransport.onMessage(payload);
}
Expand All @@ -27,7 +27,7 @@ export function getSimulatorTransport(
clientTransport = {
onMessage: undefined,
send: (payload) => {
console.log("app -> wallet", payload);
console.info("app -> wallet", payload);
if (serverTransport?.onMessage) {
serverTransport.onMessage(payload);
}
Expand Down
3 changes: 0 additions & 3 deletions packages/simulator/tests/server.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,6 @@ describe("Server", () => {
const res2 = await client.custom.log2.log("test2");
const device = await client.custom.device.open("fake-id");

console.log(res);
console.log(res2);
console.log(device);

expect(res).not.toBeFalsy();
expect(res2).not.toBeFalsy();
Expand Down
Loading

2 comments on commit 9f2b1be

@vercel
Copy link

@vercel vercel bot commented on 9f2b1be Oct 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

wallet-api – ./apps/docs

wallet-api-ledgerhq.vercel.app
wallet-api-git-main-ledgerhq.vercel.app
wallet.api.live.ledger.com

@vercel
Copy link

@vercel vercel bot commented on 9f2b1be Oct 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

wallet-api-wallet-api-tools – ./apps/wallet-api-tools

wallet-api-wallet-api-tools.vercel.app
wallet-api-wallet-api-tools-git-main-ledgerhq.vercel.app
wallet-api-wallet-api-tools-ledgerhq.vercel.app

Please sign in to comment.