# subprocess-test-utils

> Utility functions for testing subprocesses.

Latest version **1.0.0** (published 2022-07-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install subprocess-test-utils
pnpm add subprocess-test-utils
yarn add subprocess-test-utils
bun add subprocess-test-utils
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2022-07-06 |
| First published | 2022-07-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | PythonCoderAS |
| Maintainers | pythoncoderas |

## Links

- npm: https://www.npmjs.com/package/subprocess-test-utils
- Repository: https://github.com/PythonCoderAS/subprocess-test-utils
- Homepage: https://github.com/PythonCoderAS/subprocess-test-utils#readme
- Issues: https://github.com/PythonCoderAS/subprocess-test-utils/issues
- npm.io page: https://npm.io/package/subprocess-test-utils

## Recent versions

- 1.0.0 (latest) — 2022-07-06

## README

# subprocess-test-utils

Utility functions for testing subprocesses.

## API

### `runScript(scriptPath: string, args: string[] = []): Promise<boolean>`

Returns a boolean indicating whether the given script ran successfully or not.

**Parameters**

- `scriptPath`: The path to the script to run.
- `args`: An array of arguments to pass to the script.

**Returns**: A boolean indicating if the script exited successfully (exit code 0) or failed (exit code 1).

### `runScriptOutput(scriptPath: string, args: string[] = []): Promise<boolean>`

Returns the stdout and stderr of the given script.

**Parameters**

- `scriptPath`: The path to the script to run.
- `args`: An array of arguments to pass to the script.

**Returns**: An object with the `stdout` and `stderr` keys.

---
_Source: https://npm.io/package/subprocess-test-utils · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
