"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const hw_transport_mocker_1 = require("@ledgerhq/hw-transport-mocker");
const getAppAndVersion_1 = __importDefault(require("./getAppAndVersion"));
describe("getAppAndVersion", () => {
    it.each([
        {
            apdus: "0105424f4c4f5305312e322e319000",
            expectedResult: {
                name: "BOLOS",
                version: "1.2.1",
                flags: Buffer.from([0x00]),
            },
        },
        {
            apdus: "010845786368616e67650b342e312e302d706b69763201029000",
            expectedResult: {
                name: "Exchange",
                version: "4.1.0-pkiv2",
                flags: Buffer.from([0x02]),
            },
        },
    ])("should return the correct app and version", async ({ apdus, expectedResult }) => {
        const mockTransport = new hw_transport_mocker_1.MockTransport(Buffer.from(apdus, "hex"));
        const result = await (0, getAppAndVersion_1.default)(mockTransport);
        expect(result).toEqual(expectedResult);
    });
});
//# sourceMappingURL=getAppAndVersion.test.js.map