# @rachnerd/test-plugin

> Workaround for NativeScript to run unit tests located in source code (Angular style guide)

Latest version **0.0.3** (published 2017-03-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install @rachnerd/test-plugin
pnpm add @rachnerd/test-plugin
yarn add @rachnerd/test-plugin
bun add @rachnerd/test-plugin
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2017-03-29 |
| First published | 2017-03-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 0 |
| Author | Rachnerd |
| Maintainers | rachnerd |
| Keywords | Nativescript, Hooks, Angular, Tests |

## Links

- npm: https://www.npmjs.com/package/@rachnerd/test-plugin
- Repository: https://github.com/rachnerd/nativescript-tests-hook
- Homepage: https://github.com/rachnerd/nativescript-tests-hook#readme
- Issues: https://github.com/rachnerd/nativescript-tests-hook/issues
- npm.io page: https://npm.io/package/@rachnerd/test-plugin

## Dependencies (3)

- [del](https://npm.io/package/del.md) ^2.2.0
- [gulp](https://npm.io/package/gulp.md) ^3.9.1
- [run-sequence](https://npm.io/package/run-sequence.md) ^1.1.5

## Recent versions

- 0.0.3 (latest) — 2017-03-29

## README

# NativeScript tests hook
Workaround for running unit tests located in source code (according to Angular style guide)

Currently NativeScript runs spec files located in app/tests. This hook copies all source code (in app) to
a .tmp folder inside app/tests, so NativeScript can run unit tests that follow the [Angular style guide](https://angular.io/docs/ts/latest/guide/style-guide.html).

### Example
~~~
app
|-- feature
     |- feature.component.html
     |- feature.component.ts
     |- feature.component.spec.ts
~~~

## Installation

### Npm

```bash
npm install nativescript-tests-hook --save-dev
```

## Usage
Unfortunately the test runner fetches the files before the hook is finished.
To get around this you'll have to prepare before executing the test command.
```bash
tns prepare [platform] && tns test [platform]
```

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