"use strict";
var _this = this;
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var chai_1 = require("chai");
var memFs = require("mem-fs");
var fsEditor = require("mem-fs-editor");
var migrate_translations_1 = require("../../steps/migrate_translations");
var immutable_1 = require("immutable");
describe("migrate translations", function () {
    var editor;
    var options;
    var cwd = process.cwd();
    var src = cwd + "/src/test/fixtures/basic_ticket_sample_app";
    var dest = cwd + "/tmp/test/basic_ticket_sample_app";
    beforeEach(function () {
        editor = fsEditor.create(memFs.create());
        options = immutable_1.Map({ src: src, dest: dest, editor: editor });
    });
    it("should copy translations to the destination", function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
        return tslib_1.__generator(this, function (_a) {
            switch (_a.label) {
                case 0: return [4 /*yield*/, migrate_translations_1.default(options)];
                case 1:
                    _a.sent();
                    chai_1.expect(editor.exists(dest + "/src/translations/en.json")).to.be.true;
                    return [2 /*return*/];
            }
        });
    }); });
});
