Socket
Socket
Sign inDemoInstall

@zondax/zemu

Package Overview
Dependencies
Maintainers
3
Versions
166
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zondax/zemu - npm Package Compare versions

Comparing version 0.38.0 to 0.39.0-beta.1

README-npm

3

dist/constants.d.ts

@@ -19,3 +19,4 @@ /** ******************************************************************************

export declare const DEFAULT_MODEL = "nanos";
export declare const DEFAULT_START_TEXT = "Ready";
export declare const DEFAULT_NANO_START_TEXT = "Ready";
export declare const DEFAULT_STAX_START_TEXT = "This application enables";
export declare const DEFAULT_START_DELAY = 20000;

@@ -22,0 +23,0 @@ export declare const DEFAULT_KEY_DELAY = 250;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.WINDOW_STAX = exports.WINDOW_X = exports.WINDOW_S = exports.KEYS = exports.DEFAULT_START_OPTIONS = exports.DEFAULT_STAX_REJECT_KEYWORD = exports.DEFAULT_STAX_APPROVE_KEYWORD = exports.DEFAULT_NANO_REJECT_KEYWORD = exports.DEFAULT_NANO_APPROVE_KEYWORD = exports.DEFAULT_WAIT_TIMEOUT = exports.DEFAULT_METHOD_TIMEOUT = exports.KILL_TIMEOUT = exports.DEFAULT_START_TIMEOUT = exports.BASE_NAME = exports.DEFAULT_HOST = exports.DEFAULT_KEY_DELAY = exports.DEFAULT_START_DELAY = exports.DEFAULT_START_TEXT = exports.DEFAULT_MODEL = exports.DEFAULT_EMU_IMG = void 0;
exports.WINDOW_STAX = exports.WINDOW_X = exports.WINDOW_S = exports.KEYS = exports.DEFAULT_START_OPTIONS = exports.DEFAULT_STAX_REJECT_KEYWORD = exports.DEFAULT_STAX_APPROVE_KEYWORD = exports.DEFAULT_NANO_REJECT_KEYWORD = exports.DEFAULT_NANO_APPROVE_KEYWORD = exports.DEFAULT_WAIT_TIMEOUT = exports.DEFAULT_METHOD_TIMEOUT = exports.KILL_TIMEOUT = exports.DEFAULT_START_TIMEOUT = exports.BASE_NAME = exports.DEFAULT_HOST = exports.DEFAULT_KEY_DELAY = exports.DEFAULT_START_DELAY = exports.DEFAULT_STAX_START_TEXT = exports.DEFAULT_NANO_START_TEXT = exports.DEFAULT_MODEL = exports.DEFAULT_EMU_IMG = void 0;
exports.DEFAULT_EMU_IMG = "zondax/builder-zemu:speculos-54eeade4fc593c1a2478ed8730575b0cc3dc3b44";
exports.DEFAULT_MODEL = "nanos";
exports.DEFAULT_START_TEXT = "Ready";
exports.DEFAULT_NANO_START_TEXT = "Ready";
exports.DEFAULT_STAX_START_TEXT = "This application enables";
exports.DEFAULT_START_DELAY = 20000;

@@ -25,3 +26,3 @@ exports.DEFAULT_KEY_DELAY = 250;

sdk: "",
startText: exports.DEFAULT_START_TEXT,
startText: "",
caseSensitive: false,

@@ -28,0 +29,0 @@ startTimeout: exports.DEFAULT_START_TIMEOUT,

@@ -125,2 +125,6 @@ "use strict";

this.log(`Wait for start text`);
if (this.startOptions.startText.length === 0) {
this.startOptions.startText =
this.startOptions.model === "stax" ? constants_1.DEFAULT_STAX_START_TEXT : constants_1.DEFAULT_NANO_START_TEXT;
}
await this.waitForText(this.startOptions.startText, this.startOptions.startTimeout, this.startOptions.caseSensitive);

@@ -389,2 +393,5 @@ this.log(`Get initial snapshot and events`);

const lastIndex = await this.navigate(path, testcaseName, rejectConfirmationNav.schedule, waitForScreenUpdate, takeSnapshots, navLastIndex - 1);
// Avoid taking a snapshot of the final animation
await this.waitUntilScreenIs(this.mainMenuSnapshot);
await this.takeSnapshotAndOverwrite(path, testcaseName, lastIndex);
return this.compareSnapshots(path, testcaseName, lastIndex);

@@ -391,0 +398,0 @@ }

@@ -5,3 +5,3 @@ {

"license": "Apache-2.0",
"version": "0.38.0",
"version": "0.39.0-beta.1",
"description": "Zemu Testing Framework",

@@ -67,3 +67,3 @@ "main": "./dist/index.js",

"prettier": "^2.8.5",
"rimraf": "^4.3.1",
"rimraf": "^5.0.0",
"ts-jest": "^29.0.5",

@@ -70,0 +70,0 @@ "ts-node": "^10.9.1",

# Zemu
![zondax](docs/assets/zondax_light.png)
![zondax_light](docs/assets/zondax_light.png#gh-light-mode-only)
![zondax_dark](docs/assets/zondax_dark.png#gh-dark-mode-only)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

@@ -17,6 +19,6 @@ [![npm version](https://badge.fury.io/js/%40zondax%2Fzemu.svg)](https://badge.fury.io/js/%40zondax%2Fzemu)

Integration and end-to-end testing of Ledger Apps is a manual and time consuming process. We believe that the Ledger apps ecosystem is
lacking an adequate approach with respect to testing. The Zemu Framework is our solution for this problem. Under the hood, Zemu uses
Ledger's project [speculos](https://github.com/ledgerHQ/speculos). It's currently being used in every Ledger App built by Zondax, among many
others (such as Ethereum one built by Ledger team).
Integration and end-to-end testing of Ledger Apps is a manual and time consuming process. We believe that the Ledger
apps ecosystem is lacking an adequate approach with respect to testing. The Zemu Framework is our solution for this
problem. Under the hood, Zemu uses Ledger's project [speculos](https://github.com/ledgerHQ/speculos). It's currently
being used in every Ledger App built by Zondax, among many others (such as Ethereum one built by Ledger team).

@@ -23,0 +25,0 @@ _Zemu is an emulation and testing framework for Ledger Nano S/S+/X devices._

@@ -21,3 +21,4 @@ /** ******************************************************************************

export const DEFAULT_MODEL = "nanos";
export const DEFAULT_START_TEXT = "Ready";
export const DEFAULT_NANO_START_TEXT = "Ready";
export const DEFAULT_STAX_START_TEXT = "This application enables";
export const DEFAULT_START_DELAY = 20000;

@@ -44,3 +45,3 @@ export const DEFAULT_KEY_DELAY = 250;

sdk: "",
startText: DEFAULT_START_TEXT,
startText: "",
caseSensitive: false,

@@ -47,0 +48,0 @@ startTimeout: DEFAULT_START_TIMEOUT,

@@ -45,2 +45,4 @@ /** ******************************************************************************

DEFAULT_WAIT_TIMEOUT,
DEFAULT_STAX_START_TEXT,
DEFAULT_NANO_START_TEXT,
} from "./constants";

@@ -196,2 +198,7 @@

this.log(`Wait for start text`);
if (this.startOptions.startText.length === 0) {
this.startOptions.startText =
this.startOptions.model === "stax" ? DEFAULT_STAX_START_TEXT : DEFAULT_NANO_START_TEXT;
}
await this.waitForText(

@@ -591,2 +598,5 @@ this.startOptions.startText,

);
// Avoid taking a snapshot of the final animation
await this.waitUntilScreenIs(this.mainMenuSnapshot);
await this.takeSnapshotAndOverwrite(path, testcaseName, lastIndex);
return this.compareSnapshots(path, testcaseName, lastIndex);

@@ -593,0 +603,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc