UNPKG

declapract

Version:

A tool to declaratively define best practices, maintainable evolve them, and scalably enforce them.

25 lines 1.56 kB
"use strict"; 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 logger_1 = require("../../utils/logger"); const dirPath_1 = require("../__test_assets__/dirPath"); const validate_1 = require("./validate"); const logSpy = jest.spyOn(console, 'log').mockImplementation(() => logger_1.log.debug); // swap to log debug so its not displaying during tests by default describe('plan', () => { beforeEach(() => jest.clearAllMocks()); it('should be able to plan for an example declarations directory', () => __awaiter(void 0, void 0, void 0, function* () { yield (0, validate_1.validate)({ declarePracticesConfigPath: `${dirPath_1.testAssetsDirectoryPath}/example-best-practices-repo/declapract.declare.yml`, }); expect(logSpy.mock.calls).toMatchSnapshot(); })); }); //# sourceMappingURL=validate.integration.test.js.map