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
- Host: GitHub
- URL: https://github.com/quobject/tap-to-html
- Owner: Quobject
- License: mit
- Created: 2016-07-04T01:28:34.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-08-30T20:38:45.000Z (over 8 years ago)
- Last Synced: 2025-05-28T20:10:23.929Z (10 months ago)
- Language: TypeScript
- Size: 109 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tap-to-html
A Test-Anything-Protocol (tap) stream transformer to html
[](https://nodei.co/npm/tap-to-html/)
[](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
```

## 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
```

## 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/