"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
/**
 * Copyright 2017-2020 Plexus Interop Deutsche Bank AG
 * SPDX-License-Identifier: Apache-2.0
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
var setup_1 = require("./setup");
var GenJsonCommand_1 = require("../../src/commands/GenJsonCommand");
var path = require("path");
describe('Metadata JSON generation CLI', function () {
    it('Generates JSON with all metadata', function () { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
        var testName, genCommand, outDir, _a;
        return tslib_1.__generator(this, function (_b) {
            switch (_b.label) {
                case 0:
                    testName = 'generated-json';
                    genCommand = new GenJsonCommand_1.GenJsonCommand();
                    outDir = setup_1.prepareOutDir(testName);
                    return [4 /*yield*/, genCommand.action({
                            out: outDir,
                            baseDir: setup_1.getTestBaseDir()
                        })];
                case 1:
                    _b.sent();
                    _a = expect;
                    return [4 /*yield*/, setup_1.filesEqual(path.join(outDir, 'interop.json'), path.join(setup_1.getApprovalsBaseDir(), 'generated-json.approved.txt'))];
                case 2:
                    _a.apply(void 0, [_b.sent()]).toBeTruthy();
                    return [2 /*return*/];
            }
        });
    }); }, 15000);
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiR2VuSnNvbkNvbW1hbmQuc3BlYy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Rlc3RzL2NvbW1hbmRzL0dlbkpzb25Db21tYW5kLnNwZWMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUE7Ozs7Ozs7Ozs7Oz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