<commit_before># wd-tap

[![NPM](https://img.shields.io/npm/v/npm.svg)](https://www.npmjs.com/package/wd-tap)
[![Build Status](https://img.shields.io/travis/conradz/wd-tap/master.svg)](https://travis-ci.org/conradz/wd-tap)

Run TAP tests in the browser with WebDriver.

This is a simple utility to run [TAP](http://testanything.org/) tests in a
browser that is automated using
[WebDriver](http://docs.seleniumhq.org/projects/webdriver/), driven using
[Node.js](http://nodejs.org/).

## Requirements

You must first have a test page that has a `<pre>` element with an ID of
`output` that will contain the TAP test output. You will also need a web
browser that is automated using WebDriver; you can run one yourself locally or
you could use a service like [Sauce Labs](http://saucelabs.com/) that will run
them for you. For attaching to a WebDriver-automated browser, use
[wd](https://github.com/admc/wd) that allows Node to interface to WebDriver.

The test results are parsed using
[tap-parser](https://github.com/substack/tap-parser).

## Example

This example assumes that you have a WebDriver server running locally, see the
[wd docs](https://github.com/admc/wd) for how to connect to a browser. It also
assumes that you have an HTTP server accessible from the browser serving the
test page at `http://localhost:8000/test.html`.
<commit_msg>Fix npm badge [ci skip]<commit_after># wd-tap

[![NPM](https://img.shields.io/npm/v/wd-tap.svg)](https://www.npmjs.com/package/wd-tap)
[![Build Status](https://img.shields.io/travis/conradz/wd-tap/master.svg)](https://travis-ci.org/conradz/wd-tap)

Run TAP tests in the browser with WebDriver.

This is a simple utility to run [TAP](http://testanything.org/) tests in a
browser that is automated using
[WebDriver](http://docs.seleniumhq.org/projects/webdriver/), driven using
[Node.js](http://nodejs.org/).

## Requirements

You must first have a test page that has a `<pre>` element with an ID of
`output` that will contain the TAP test output. You will also need a web
browser that is automated using WebDriver; you can run one yourself locally or
you could use a service like [Sauce Labs](http://saucelabs.com/) that will run
them for you. For attaching to a WebDriver-automated browser, use
[wd](https://github.com/admc/wd) that allows Node to interface to WebDriver.

The test results are parsed using
[tap-parser](https://github.com/substack/tap-parser).

## Example

This example assumes that you have a WebDriver server running locally, see the
[wd docs](https://github.com/admc/wd) for how to connect to a browser. It also
assumes that you have an HTTP server accessible from the browser serving the
test page at `http://localhost:8000/test.html`.

{'fraction_non_alphanumeric': 0.12106627175120326, 'fraction_numerical': 0.002961865975564606, 'mean_word_length': 4.382470119521912, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 14, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1387615', 'n_tokens_mistral': 880, 'n_tokens_neox': 829, 'n_words': 314}