{"library":"test-as-package","type":"library","category":null,"description":"test-as-package is a JavaScript/TypeScript utility designed for testing a local repository as if it were an already deployed npm package. This is particularly useful for internal monorepos or libraries where verifying the consumer-facing behavior, including CLI commands and package exports, is crucial without the need for actual publishing. The current stable version is 2.0.4, with patch releases occurring regularly for dependency updates and minor fixes; major versions are less frequent but typically introduce significant changes. A key differentiator is its ability to pack and install the local package into a temporary Node.js `node_modules` environment without modifying the project's `package.json` or `package-lock.json`, thus ensuring a clean testing environment that closely mirrors an actual installation. It offers both a convenient CLI interface for direct execution of test commands and a programmatic API for more granular control within test suites.","language":"javascript","status":"active","version":"2.0.4","tags":["javascript","test","package","repo","npm","internal","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install test-as-package","imports":["import { runPackageCli } from 'test-as-package';","import type { CliOutput } from 'test-as-package';","import type { RunPackageCliOptions } from 'test-as-package';"]},{"cmd":"yarn add test-as-package","imports":[]},{"cmd":"pnpm add test-as-package","imports":[]}],"homepage":null,"github":"https://github.com/electrovir/test-as-package","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/test-as-package","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/test-as-package/compatibility"}}