# ahk-unit

> Unit testing library for Autohotkey

Latest version **1.0.5** (published 2017-05-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install ahk-unit
pnpm add ahk-unit
yarn add ahk-unit
bun add ahk-unit
```

Provides the command `ahk-unit`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2017-05-22 |
| First published | 2017-05-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Tariq Porter @tariqporter |
| Maintainers | tariqporter |
| Keywords | npm, ahk |

## Links

- npm: https://www.npmjs.com/package/ahk-unit
- npm.io page: https://npm.io/package/ahk-unit

## Dependencies (1)

- [chokidar](https://npm.io/package/chokidar.md) ^1.7.0

## Recent versions

- 1.0.5 (latest) — 2017-05-22
- 1.0.4 — 2017-05-22
- 1.0.3 — 2017-05-22
- 1.0.2 — 2017-05-22
- 1.0.1 — 2017-05-22
- 1.0.0 — 2017-05-22

## README

# ahk-unit
Unit testing library for Autohotkey

### ahk-unit library is located in the `dist` folder
###
###
### Alternatively if you wish to have automated tests on change of any Included file

Install `ahk-unit` as a dependency of your project

```bash
npm install --save-dev ahk-unit
```

To run the examples, simply at the root of this project run

```bash
 node .\bin\ahk-unit .\examples\tests.ahk
```

For your own project, you will need to create a `ahk-unit.conf.js` in your root, to provide the path of `Autohotkey.exe`

`ahk-unit.conf.js`
```js
exports.config = () => {
	return {
		ahkPath: "c:\\program files\\Autohotkey\\Autohotkey.exe"
	};
}
```

Inside your project you can then have continous tests running

`package.json`
```
"scripts": {
  "test": "ahk-unit ./tests/tests.ahk"
}
```

This will load `tests.ahk` and all files included inside it.
Your test file should include `ahk-unit.ahk`

```
#Include %A_ScriptDir%\..\node_modules\ahk-unit\lib\ahk-unit.ahk
```

Any class to be tested should extend the `AhkUnit` class

```
class MyClassTest extends AhkUnit
```

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