"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const fs_1 = tslib_1.__importDefault(require("fs"));
const path_1 = tslib_1.__importDefault(require("path"));
const trace_adapter_1 = tslib_1.__importDefault(require("../middlewares/ios/adapter/trace-adapter"));
describe('ios trace 适配器', () => {
    it('trace转换', async () => {
        const src = path_1.default.join(__dirname, '../__mock__/jsc-trace.json');
        const dest = path_1.default.join(__dirname, '../__mock__/converted-v8-trace.json');
        const data = await fs_1.default.promises.readFile(src);
        const jscJson = JSON.parse(data.toString());
        const traceAdapter = new trace_adapter_1.default();
        const v8Json = traceAdapter.jsc2v8(jscJson);
        await fs_1.default.promises.writeFile(dest, JSON.stringify(v8Json));
        expect(v8Json.length).toBeGreaterThan(0);
    });
});
