UNPKG

@bemedev/cli-test

Version:

A library for testing CLI libraries (INCEPTION !!)

15 lines (12 loc) 453 B
import { CLI_TEST_EXTENSION } from '../constants.js'; function normalizePath(fileToTest) { const isStartWith = fileToTest.startsWith('./') || fileToTest.startsWith('/'); return isStartWith ? fileToTest.trim() : `./${fileToTest.trim()}`; } const checkHaveCli = (filepath) => { if (!filepath) return false; return filepath.includes(CLI_TEST_EXTENSION); }; export { checkHaveCli, normalizePath }; //# sourceMappingURL=path.js.map