# track-spec

> A test framework of track.

Latest version **0.0.4** (published 2018-04-01) · ISC license · 0 weekly downloads

## Install

```sh
npm install track-spec
pnpm add track-spec
yarn add track-spec
bun add track-spec
```

## 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.4 |
| Published | 2018-04-01 |
| First published | 2018-02-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | alfa-jpn |
| Maintainers | alfa-jpn |

## Links

- npm: https://www.npmjs.com/package/track-spec
- Repository: https://github.com/yosami-framework/track-spec
- Homepage: https://github.com/yosami-framework/track-spec#readme
- Issues: https://github.com/yosami-framework/track-spec/issues
- npm.io page: https://npm.io/package/track-spec

## Recent versions

- 0.0.4 (latest) — 2018-04-01
- 0.0.3 — 2018-03-20
- 0.0.2 — 2018-02-04
- 0.0.1 — 2018-02-04

## README

# TrackSpec

A test framework of track.

[![Build Status](https://travis-ci.org/yosami-framework/track-spec.svg?branch=master)](https://travis-ci.org/yosami-framework/track-spec)

## Installation

### npm

```shell
npm install track-spec
```

## Usage

This framework is extension of ospec.

### Running test

package.json

```json
"scripts": {
  "test": "ospec"
}
```

```shell
$ npm test
```

### Example

TrackSpec has the methods of ospec and methods of like rspec. (`describe`, `context`, `it`, `expect`)

```javascript
const t    = require('track-spec');
const Hoge = require('./hoge');

t.describe('Hoge', () => {
  t.describe('.hoge', () => {
    const subject = ( () => Hoge.hoge(type));
    let type = null;

    t.context('When type is `upper`', () => {
      t.beforeEach(() => {
        type = `upper`;
      });

      t.it('Return HOGE', () => {
        t.expect(subject()).equals('HOGE');
      });
    });

    t.context('When type is `lower`', () => {
      t.beforeEach(() => {
        type = `lower`;
      });

      t.it('Return hoge', () => {
        t.expect(subject()).equals('hoge');
      });
    });
  });
});
```

## CONTRIBUTING

### test

```
$ npm test
```

### linter

```
$ npm run linter
```

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