Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tape-promise into 'other' #210

Merged
merged 1 commit into from Jan 9, 2019
Merged

Conversation

jprichardson
Copy link
Contributor

Unlike blue-tape, tape-promise has the following benefits:

  1. Doesn't explicitly depend upon tape. i.e. can directly modify tape if need be and not fixed to the tape version of blue-tape.
  2. Explicitly supports async/await.
  3. Has better documentation.

Unlike `blue-tape`, `tape-promise` has the following benefits:

1. Doesn't explicitly depend upon `tape`. i.e. can directly modify `tape` if need be and not fixed to the `tape` version of `blue-tape`.
2. Explicitly supports async/await.
3. Has better documentation.
@wavded
Copy link

wavded commented Nov 6, 2015

@jprichardson why not patch blue-tape? to me, the functionality seems so close.

  1. blue-tape does support async/await (really its a babel thing)
  2. docs haven't been a problem for me but a pull could fix that
  3. i haven't experience an issue needing 1 (@spion has been good with pulling version bumps in), but maybe you could elaborate on why? i kinda like having tape explicitly defined as a dep so i know it works and has been tested.

@jprichardson
Copy link
Contributor Author

  1. While you're right, it doesn't explicitly (stated via Readme / include tests) support it.
  2. Yes.
  3. This is the most important aspect for me. I don't want it to depend upon Tape. I have a bunch of unreleased tape utilities that just decorate tape. What's cool is that people can leverage functional composition to pick/choose which they like.

e.g....

var tape = require('tape')
var tapePromise = require('tape-promise')
var tapeSomething = require('tape-something')
var compose = require('some-library-that-has-compose-maybe-lodash')

var _test = compose(tapePromise, tapeSomething)
var test = _test(tape)

test('should do something', function (t) { /** ... **/ }

@ljharb
Copy link
Collaborator

ljharb commented Nov 8, 2015

fwiw, I don't think anything should explicitly state support for async/await, since that betrays a fundamental misunderstanding of what async/await is - it's nothing more than syntax sugar for nested promises, so everything and anything that works with promises supports async/await.

@yoshuawuyts
Copy link

@ljharb that's the best description of async/await I've seen so far.

@lijunle
Copy link

lijunle commented Jun 25, 2016

I could like to use tape-promise instead of blue-tape.

I am writing the following scripts to run ES6 test and ES6 test coverage. It is using tape directly, I could like to declare tape as devDependencies and with tape-promise.

"scripts": {
  "test": "babel-node node_modules/tape/bin/tape ./test/**/*.js",
  "test-coverage": "babel-node node_modules/isparta/bin/isparta cover node_modules/tape/bin/tape -- ./test/**/*.js"
}

@ljharb ljharb added the needs "allow edits" PR needs "allow edits" checked label Jan 9, 2019
@ljharb
Copy link
Collaborator

ljharb commented Jan 9, 2019

@jprichardson could you check "allow edits" on the right hand side of this PR?

@jprichardson
Copy link
Contributor Author

@ljharb done.

@ljharb ljharb removed the needs "allow edits" PR needs "allow edits" checked label Jan 9, 2019
@ljharb ljharb force-pushed the patch-1 branch 2 times, most recently from 8aca34b to d15bc4b Compare January 9, 2019 19:37
@ljharb ljharb merged commit d15bc4b into tape-testing:master Jan 9, 2019
@jprichardson jprichardson deleted the patch-1 branch January 9, 2019 21:11
ljharb added a commit that referenced this pull request Feb 9, 2019
[New] Implements TAP TODO directive (#254)
[New] add alias 'notDeepEquals' to 'notDeepEqual' function (#411)

[Fix] fix premature end of tests (and running sibling tests) when test includes subtests (#403, #222)
[Fix] only use one test runner for results, even if multiple streams are created (#404, #361, #105)
[Fix] windows: Show failure location even if driver letter is lowercase (#329)

[Docs] link to mixed tape (#445)
[Docs] Add electron-tap (#240)
[Docs] Add tape-promise into 'other' (#210)
[Docs] Mention [`flip-tape`](https://github.com/pguth/flip-tape/blob/master/README.md) in the section "other". (#359)
[Docs] Add an alternative ES6 tape runner (#328)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants