{"id":17419763,"url":"https://github.com/bendrucker/tape-istanbul","last_synced_at":"2025-04-15T00:01:48.804Z","repository":{"id":65514508,"uuid":"62508445","full_name":"bendrucker/tape-istanbul","owner":"bendrucker","description":"Print and parse code coverage with tape tests","archived":false,"fork":false,"pushed_at":"2020-05-25T04:10:58.000Z","size":37,"stargazers_count":12,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T08:14:06.937Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bendrucker.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-03T17:51:10.000Z","updated_at":"2021-01-13T19:50:20.000Z","dependencies_parsed_at":"2023-01-26T21:16:05.357Z","dependency_job_id":null,"html_url":"https://github.com/bendrucker/tape-istanbul","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bendrucker%2Ftape-istanbul","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bendrucker%2Ftape-istanbul/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bendrucker%2Ftape-istanbul/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bendrucker%2Ftape-istanbul/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bendrucker","download_url":"https://codeload.github.com/bendrucker/tape-istanbul/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248981263,"owners_count":21193145,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-17T02:32:06.279Z","updated_at":"2025-04-15T00:01:48.769Z","avatar_url":"https://github.com/bendrucker.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tape-istanbul [![Build Status](https://travis-ci.org/bendrucker/tape-istanbul.svg?branch=master)](https://travis-ci.org/bendrucker/tape-istanbul) [![Greenkeeper badge](https://badges.greenkeeper.io/bendrucker/tape-istanbul.svg)](https://greenkeeper.io/)\n\n\u003e Print and parse code coverage with tape tests\n\n\n## Install\n\n```\n$ npm install --save tape-istanbul\n```\n\n\n## Usage\n\n```js\nvar browserify = require('browserify')\nvar tapeIstanbul = require('tape-istanbul')\nvar tapeRun = require('tape-run')\n\nbrowserify()\n  .add('test.js')\n  // Registers browserify-istanbul and adds a tape-finished hook\n  .plugin('tape-istanbul/plugin')\n  .pipe(tapeRun())\n  .pipe(tapeIstanbul())\n```\n\n```sh\n$ browserify test.js -p tape-istanbul/plugin | tape-run | tape-istanbul\n```\n\ntape-istanbul is composed of two parts: \n\n* a tape hook that print coverage data as JSON after your tests run ([hook.js](hook.js))\n* a parser that separates the coverage data from TAP output ([parser.js](parser.js), [index.js](index.js))\n\nThe hook purely writes text and the for the parser to transform. The parser streams all output and excludes the coverage data, which it writes to a file. The stream will not end until coverage has been fully written.\n\nFor convenience, a browserify plugin that can be used with your own copy of [browserify-istanbul](https://github.com/devongovett/browserify-istanbul) is included as `require('tape-istanbul/plugin')`. In any other environment, configure Istanbul instrumentation and require the hook directly: `require('tape-istanbul/hook')`.\n\n## API\n\n#### `tapeIstanbul([output])` -\u003e `stream`\n\nReturns a transform stream that receives raw test output (e.g. from a spawned Node process or browser) passes through the original TAP output from tape. Coverage data generated by tape-istanbul's coverage hook is extracted and written to disk.\n\n##### output\n\n*Required*  \nType: `string`\n\nThe output destination where coverage will be written as JSON.\n\n#### `tape-istanbul --output/-o \u003cfile\u003e`\n\nSpawns tape-istanbul as a CLI that transforms stdin, writes TAP output to stdout, and writes coverage data to disk at the specified `--output` location.\n\n## License\n\nMIT © [Ben Drucker](http://bendrucker.me)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbendrucker%2Ftape-istanbul","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbendrucker%2Ftape-istanbul","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbendrucker%2Ftape-istanbul/lists"}