An open API service indexing awesome lists of open source software.

https://github.com/quobject/tap-to-html

A Test-Anything-Protocol (tap) stream transformer to html
https://github.com/quobject/tap-to-html

Last synced: 10 months ago
JSON representation

A Test-Anything-Protocol (tap) stream transformer to html

Awesome Lists containing this project

README

          

# tap-to-html
A Test-Anything-Protocol (tap) stream transformer to html

[![NPM](https://nodei.co/npm/tap-to-html.png?downloads=true&downloadRank=true)](https://nodei.co/npm/tap-to-html/)
[![NPM](https://nodei.co/npm-dl/tap-to-html.png?months=6&height=3)](https://nodei.co/npm/tap-to-html/)

[![NPM version][npm-image]][npm-url]
[![NPM downloads][downloads-image]][downloads-url]
[![Build status][travis-image]][travis-url]

## Installation

npm install tap-to-html

## Usage

### Javascript

```js
var tapToHtml = new require('tap-to-html').TapToHtml();
var tapToHtmlstream = tapToHtml.stream();

sourceStream.pipe(tapToHtmlstream).pipe(writeStream);
```

### Typescript

```js
import { TapToHtml } from 'tap-to-html';

const tapToHtml = new TapToHtml();

const tapToHtmlstream = tapToHtml.stream();
sourceStream.pipe(tapToHtmlstream).pipe(writeStream);
```

## Example 1

### input

```txt
TAP version 13
# testling.baseconfig_for_spec.ts
# get value
ok 1 has key buildtype
# testling.context.ts
# constructor
ok 2 cloudconfig
ok 3 keyspath
ok 4 workingpath
ok 60 device
ok 61 ebsSize
ok 62 ebsVolumeType
# testling.core.quhnb_docker.ts
# constructor
# testling.core.vpc_options.ts
# constructor
ok 63 vpcId
ok 64 securityGroupId

1..64
# tests 64
# pass 64

# ok
```

### output

```html

Tap To Html




.error {
background-color: #ff0000;
color: #ffffff;
font-size: 24px;
font-weight: bold;
}
.ok {
background-color: #71eb3d;
}
.errorbody {
background-color: #ff0000;
}
.okbody {
background-color: #00ff00;
}
.container {
background-color: #ffffff;
margin-top: 40px;
}
h3 {
font-family: "Times New Roman";
font-size: 20px;
}
p {
font-family: "Courier New";
font-size: 20px;
}
.yaml {
background-color: #f8dada;
font-size: 20px;
}
.toprow {
height: 10px;
}
.summary {
margin: 20px;
}
span.label {
font-size: 20px;
}


$(document).ready(function () {
setInterval(function () {
location.reload();
}, 4000);
});






Tests 64


Pass 64


Fail 0

7:36:02 AM








# testling.baseconfig_for_spec.ts


# get value


ok 1 has key buildtype


# testling.context.ts


# constructor


ok 2 cloudconfig


ok 3 keyspath


ok 4 workingpath


ok 60 device


ok 61 ebsSize


ok 62 ebsVolumeType


# testling.core.quhnb_docker.ts


# constructor


# testling.core.vpc_options.ts


# constructor


ok 63 vpcId


ok 64 securityGroupId




# tests 64


# pass 64




# ok





```

![Example1](./images/example1.png)

## Example 2

### input

```txt
TAP version 13
# testling.core.ebs_options.ts
# constructor
ok 57 machineName
ok 62 ebsVolumeType
# testling.core.quhnb_docker.ts
# constructor
# testling.core.vpc_options.ts
# constructor
not ok 63 vpcId
---
operator: equal
expected: 'vpc id2'
actual: 'vpc id'
...
ok 64 securityGroupId

1..64
# tests 64
# pass 63
# fail 1
```

### output

```html

Tap To Html




.error {
background-color: #ff0000;
color: #ffffff;
font-size: 24px;
font-weight: bold;
}
.ok {
background-color: #71eb3d;
}
.errorbody {
background-color: #ff0000;
}
.okbody {
background-color: #00ff00;
}
.container {
background-color: #ffffff;
margin-top: 40px;
}
h3 {
font-family: "Times New Roman";
font-size: 20px;
}
p {
font-family: "Courier New";
font-size: 20px;
}
.yaml {
background-color: #f8dada;
font-size: 20px;
}
.toprow {
height: 10px;
}
.summary {
margin: 20px;
}
span.label {
font-size: 20px;
}


$(document).ready(function () {
setInterval(function () {
location.reload();
}, 4000);
});






Tests 64


Pass 63


Fail 1

7:40:50 AM



# testling.core.quhnb_docker.ts# constructor# testling.core.vpc_options.ts# constructor


not ok 63 vpcId



---
operator: equal
expected: 'vpc id2'
actual: 'vpc id'
...





# testling.core.ebs_options.ts


# constructor


ok 57 machineName


ok 62 ebsVolumeType


# testling.core.quhnb_docker.ts


# constructor


# testling.core.vpc_options.ts


# constructor


# testling.core.quhnb_docker.ts# constructor# testling.core.vpc_options.ts# constructor


not ok 63 vpcId



---
operator: equal
expected: 'vpc id2'
actual: 'vpc id'
...

ok 64 securityGroupId




# tests 64


# pass 63


# fail 1





```

![Example2](./images/example2.png)

## License

MIT

[npm-image]: https://img.shields.io/npm/v/tap-to-html.svg?style=flat
[npm-url]: https://npmjs.org/package/tap-to-html
[downloads-image]: https://img.shields.io/npm/dm/tap-to-html.svg?style=flat
[downloads-url]: https://npmjs.org/package/tap-to-html
[travis-image]: https://api.travis-ci.org/Quobject/tap-to-html.svg
[travis-url]: https://travis-ci.org/Quobject/tap-to-html/