<commit_before># flip-tape

> Write [`tape`](https://github.com/substack/tape)-tests starting with the message string: `'Two is less than three'.ok(2 < 3)`

Adds `'Two is less than three'.ok(2 < 3)` syntax to tape. Original functionality is kept.

```bash
npm install flip-tape
```

## Usage

```js
var tape = require('tape')
var flip = require('flip-tape')

var test = flip(tape)

test(t => {
  t.plan(3)
  t.ok(2 < 3, 'Regular tape syntax works as expected.')

  // This is new:
  'Two is less than three'.ok(2 < 3)
  'Five equals five'.equals(5, 5)

  'But there is a callback too'.test(t => {
    t.notOk(2 > 3)
  })
})
```

All of [tapes methods](https://github.com/substack/tape#methods) that print out `msg` to the command-line are usable with the flipped syntax.

## API

#### `var test = flip(tape)`

Returns a tape wrapper that attaches all tape-methods that print out to the command-line to the String prototype.

#### `'[message]'.test([opt], cb)`

Calls `tape` like this: `tape([message], [opt], cb)`.

#### `'[message]'.[tapeTestMethodName]([actual, fn], [expected])`
<commit_msg>point out the new API in README<commit_after># flip-tape

> Write [`tape`](https://github.com/substack/tape)-tests starting with the message string: `'Two is less than three'.ok(2 < 3)`

Adds `'Two is less than three'.ok(2 < 3)` syntax to tape. Original functionality is kept.

```bash
npm install flip-tape
```

## Usage

```js
var tape = require('tape')
var flip = require('flip-tape')

var test = flip(tape)

test('Regular tape assertion group', t => {
  t.plan(3)
  t.ok(2 < 3, 'Regular tape syntax works as expected.')

  // This is new:
  'Two is less than three'.ok(2 < 3)
  'Five equals five'.equals(5, 5)

  'But there is a callback too'.test(t => {
    t.notOk(2 > 3)
  })
})

'You can also start a group of assertions that way'.test(t => {
  t.plan(1)
  t.pass()
})
```

All of [tapes methods](https://github.com/substack/tape#methods) that print out `msg` to the command-line are usable with the flipped syntax.

## API

#### `var test = flip(tape)`

Returns a tape wrapper that attaches all tape-methods that print out to the command-line to the String prototype.

#### `'[message]'.test([opt], cb)`

Calls `tape` like this: `tape([message], [opt], cb)`.

#### `'[message]'.[tapeTestMethodName]([actual, fn], [expected])`

{'fraction_non_alphanumeric': 0.17260626878488622, 'fraction_numerical': 0.011592958351223702, 'mean_word_length': 3.9364406779661016, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 12, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, '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': '2574880', 'n_tokens_mistral': 863, 'n_tokens_neox': 813, 'n_words': 274}