@@ -11,14 +11,22 @@ import Iota from '../src/Iota';
1111const API_PORT : number = 5000 ;
1212const SPECULOS_BASE_URL : string = `http://127.0.0.1:${ API_PORT } ` ;
1313
14- // Before running the tests you need to install speculos and start the iota app with it.
15- // If the binary is not available, download it:
16- // gh release download --repo https://github.com/iotaledger/ledger-app-iota -p nanox.tar.gz ledger-app-iota-v1.0.0
14+ // Before running the tests, pull the speculos Docker image and download the ledgernano binary.
15+ // Then start the speculos simulator and run the tests.
16+ //
17+ // Pull speculos docker image:
18+ // docker pull ghcr.io/ledgerhq/speculos
19+ //
20+ // Download ledgernano binary:
21+ // curl -L -o nanox.tar.gz https://github.com/iotaledger/ledger-app-iota/releases/download/ledger-app-iota-v1.0.0/nanox.tar.gz
1722// tar -xvf nanox.tar.gz
18- // sudo apt-get install qemu-user-static libxcb-xinerama0 // might be needed for speculos to work
19- // pip install speculos
20- // Finally to start the emulator:
21- // speculos --api-port 5000 --display headless ./sdk/ledgerjs-hw-app-iota/tests/iota
23+ // mv nanox/iota sdk/ledgerjs-hw-app-iota/tests/iota
24+ //
25+ // Start speculos simulator:
26+ // docker run --rm -d -p 5000:5000 -v $(pwd)/sdk/ledgerjs-hw-app-iota/tests:/app ghcr.io/ledgerhq/speculos --api-port 5000 --display headless /app/iota
27+ //
28+ // Run tests:
29+ // pnpm --filter @iota/ledgerjs-hw-app-iota test
2230describe . sequential ( 'Test ledgerjs-hw-app-iota' , ( ) => {
2331 it ( 'Iota init' , async ( ) => {
2432 const transport = await openTransportReplayer ( RecordStore . fromString ( '' ) ) ;
0 commit comments