declapract
Version:
A tool to declaratively define best practices, maintainable evolve them, and scalably enforce them.
25 lines • 1.63 kB
JavaScript
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
const dirPath_1 = require("../__test_assets__/dirPath");
const readDeclarePracticesConfig_1 = require("./readDeclarePracticesConfig");
describe('readDeclarePracticesConfig', () => {
it('should be able to read a declared practices from example declarations repo config', () => __awaiter(void 0, void 0, void 0, function* () {
const config = yield (0, readDeclarePracticesConfig_1.readDeclarePracticesConfig)({
configPath: `${dirPath_1.testAssetsDirectoryPath}/example-best-practices-repo/declapract.declare.yml`,
});
// console.log(config);
expect(config.practices.length).toBeGreaterThanOrEqual(7);
expect(config.useCases.length).toEqual(2);
expect(config).toMatchSnapshot({ rootDir: expect.any(String) }); // log an example
}));
});
//# sourceMappingURL=readDeclarePracticesConfig.integration.test.js.map
;