"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const errors_1 = require("@ledgerhq/errors");
const api_1 = __importDefault(require("../manager/api"));
require("./test-helpers/setup");
describe("getDeviceVersion", () => {
    test("it works with a 1.5.5", async () => {
        const res = await api_1.default.getDeviceVersion(823132164, 1);
        expect(res).toMatchObject({
            target_id: "823132164",
        });
        expect(res.id).toBeDefined();
        expect(res.name).toBeDefined();
        expect(res.display_name).toBeDefined();
        expect(res.target_id).toBeDefined();
        expect(res.description).toBeDefined();
        expect(res.device).toBeDefined();
        expect(res.providers).toBeDefined();
        expect(res.mcu_versions).toBeDefined();
        expect(res.se_firmware_final_versions).toBeDefined();
        expect(res.osu_versions).toBeDefined();
        expect(res.application_versions).toBeDefined();
        expect(res.date_creation).toBeDefined();
        expect(res.date_last_modified).toBeDefined();
    });
    test("it throw FirmwareNotRecognized with dumb data", async () => {
        const r = await api_1.default.getDeviceVersion(42, 1).then(() => null, e => e);
        expect(r).toBeDefined();
        expect(r).toBeInstanceOf(errors_1.FirmwareNotRecognized);
    });
});
//# sourceMappingURL=manager.js.map