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

Is this just a shorter way of doing babel-node tests.js | tape? #6

Open
barneycarroll opened this issue Nov 9, 2015 · 8 comments
Open

Comments

@barneycarroll
Copy link

Perhaps because the name made me think of tape-run, a tool for running tape tests in a browser process, I lazily guessed this might have something to do with bringing the Babel runtime to the browser and compiling the rest, but trial and error tells me I got that wrong :) Going over the README had me wondering what the essence of this package is about - is it a Windows-compatible CLI for what *nix shell would do with babel-node tests.js | tape, or is there something else going on?

@wavded wavded self-assigned this Nov 10, 2015
@wavded
Copy link
Owner

wavded commented Nov 10, 2015

@barneycarroll its the runner you get with tape (that supports things like globs) with babel registered as to pick up your .babelrc settings and babel modules. i believe it should work with Windows but I haven't tried. runs tests on the command line, no browser support.

@barneycarroll
Copy link
Author

God knows what Windows users are getting TBH ;P – So this is basically a way of avoiding manually invoking babel and tape as separate strings on the command line?

@wavded
Copy link
Owner

wavded commented Nov 10, 2015

Just ran this on Windows, works the same as on *nix. You can't pipe babel-node into tape bin but it does behave like tape in that is supports globs so I usually do something like this in my package.json

"scripts": {
    "test": "babel-tape-runner \"**/*-test.js\""
},

@wavded wavded removed their assignment Nov 18, 2015
@fraserxu
Copy link

Hi @wavded , is there anyway that I could pipe the test result to another test reporter?

I need something like babel-tape-runner my-test.js | snazzy, currently I could not find it work so I guess pipe is not supported here?

@wavded
Copy link
Owner

wavded commented Dec 17, 2015

Not sure how you are consuming the output but the TAP is sent through STDOUT so you could pipe if you wanted to work with that output however if anything else writing to STDOUT it probably would break.

@fraserxu
Copy link

Yes, sorry about my previous comment. I made some mistakes about the reporter, it works great for me now and thanks for the module!

@Wilfred
Copy link

Wilfred commented Sep 23, 2016

See #15 (comment)

@mindplay-dk
Copy link

Related question, is this any different from tape -r @babel/register?

Seems a lot simpler than replacing the test-runner itself?

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

No branches or pull requests

5 participants