declapract
Version:
A tool to declaratively define best practices, maintainable evolve them, and scalably enforce them.
25 lines • 1.45 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const dirPath_1 = require("../../__test_assets__/dirPath");
const readExampleDeclarations_1 = require("./readExampleDeclarations");
const readPracticeDeclarations_1 = require("./readPracticeDeclarations");
const readUseCaseDeclarations_1 = require("./readUseCaseDeclarations");
describe('readUseCaseDeclarations', () => {
it('should get the declarations correctly', async () => {
const practices = await (0, readPracticeDeclarations_1.readPracticeDeclarations)({
declaredPracticesDirectory: `${dirPath_1.testAssetsDirectoryPath}/example-best-practices-repo/src/practices`,
});
const examples = await (0, readExampleDeclarations_1.readExampleDeclarations)({
declarationsRootDirectory: `${dirPath_1.testAssetsDirectoryPath}/example-best-practices-repo`,
declaredExamplesDirectory: `${dirPath_1.testAssetsDirectoryPath}/example-best-practices-repo/src/examples`,
});
const useCases = await (0, readUseCaseDeclarations_1.readUseCaseDeclarations)({
declaredUseCasesPath: `${dirPath_1.testAssetsDirectoryPath}/example-best-practices-repo/src/useCases.yml`,
practices,
examples,
});
expect(useCases.length).toEqual(2);
expect(useCases).toMatchSnapshot();
});
});
//# sourceMappingURL=readUseCaseDeclarations.integration.test.js.map