"use strict";
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result["default"] = mod;
    return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const fs = __importStar(require("fs"));
const os = __importStar(require("os"));
const repo_1 = __importDefault(require("../lib/repo"));
const fs_extra_1 = require("fs-extra");
describe('nest repo setup', () => {
    let projectDir;
    beforeEach(() => {
        projectDir = `${os.tmpdir()}/fun-project`;
        console.log(projectDir);
        fs_extra_1.removeSync(projectDir);
        fs_extra_1.ensureDirSync(projectDir);
    });
    test('Creates modelnest.json', () => {
        const repo = new repo_1.default(projectDir);
        repo.init();
        const exists = fs.existsSync(`${projectDir}/modelnest.json`);
        expect(exists).toBeTruthy();
    });
    test('modelnest.json contains empty list of assets', () => {
        const repo = new repo_1.default(projectDir);
        repo.init();
        const packages = JSON.parse(fs.readFileSync(`${projectDir}/modelnest.json`, 'utf8'));
        expect(packages.assets).toEqual({});
        expect(packages.nest).toBe('nest_models');
        const exists = fs.existsSync(`${projectDir}/nest_models`);
        expect(exists).toBeTruthy();
    });
});
//# sourceMappingURL=setup.test.js.map