UNPKG

@citadelgroup/reporting-cli

Version:

Command line interface to develop custom reports for LeanIX EAM

35 lines (34 loc) 1.22 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var file_helpers_1 = require("./file.helpers"); describe('File Helpers', function () { describe('loadCliConfig()', function () { it('loads default values', function () { var packageJson = {}; expect(file_helpers_1.loadCliConfig(packageJson)).toEqual({ distPath: './dist', buildCommand: './node_modules/.bin/webpack' }); }); it('loads override value for distPath', function () { var packageJson = { leanixReportingCli: { distPath: '/tmp/build' } }; expect(file_helpers_1.loadCliConfig(packageJson)).toMatchObject({ distPath: '/tmp/build' }); }); it('loads override value for buildCommand', function () { var packageJson = { leanixReportingCli: { buildCommand: 'make report' } }; expect(file_helpers_1.loadCliConfig(packageJson)).toMatchObject({ buildCommand: 'make report' }); }); }); });