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

Watching #3

Open
raine opened this issue Oct 29, 2015 · 9 comments
Open

Watching #3

raine opened this issue Oct 29, 2015 · 9 comments

Comments

@raine
Copy link

raine commented Oct 29, 2015

I understand it may not exactly be in the scope of this project but I'm wondering if there's any way to make babel-tape-runner a long running process similarly to mocha's -w.

I'm more concerned about minimizing the slow startup time (because of babel overhead) than watching files for changes.

@wavded wavded self-assigned this Oct 30, 2015
@raine
Copy link
Author

raine commented Oct 30, 2015

Watching can be easily accomplished with npm-watch but what I like about mocha -w is that it makes test feedback instantaneous, probably because it doesn't spin up a new process and require stuff every time files change.

@wavded
Copy link
Owner

wavded commented Oct 30, 2015

I don't have any plans on supporting watching. A quick look around GH didn't turn up any tape runners with watching built in, have you found any?

@nicolaspayot
Copy link

That'd be a neat feature! I'm using watch to do that, in a personal project: https://github.com/nicolaspayot/gym-tracker/blob/master/api/package.json#L12

@wavded wavded removed their assignment Nov 3, 2015
@dacodekid
Copy link

I tried and failed in every possible way, I could think of -m - wasted well over two weeks now. I couldn't remove and re-require the test files. It just kept add them on the stack instead. Hope someone implement this - assuming this might increase tape's speed closer to mocha.

@r-k-b
Copy link

r-k-b commented Apr 3, 2016

tape-watch keeps a long-running process, but doesn't seem to support transpilers at the moment.

@pke
Copy link

pke commented Jul 19, 2016

That pretty much lets me get back to mocha/chai. With a huge codebase you want instant test feedback and that can only be achieved by watching for changes.

@wavded
Copy link
Owner

wavded commented Jul 19, 2016

FYI: tape-watch supports the require flag now so you can use things like babel with it

https://github.com/rstacruz/tape-watch#using-with-babel

@Wilfred
Copy link

Wilfred commented Aug 17, 2016

Here's an example of using tape-watch instead of babel-tape-runner, from my package.json:

  "scripts": {
    "test": "babel-tape-runner static/__tests__/* | tap-diff",
    "test-watch": "tape-watch -r babel-register static/__tests__/* -o '| ./node_modules/tap-diff/distributions/cli.js'",

@brunoreis
Copy link

Please notice that if you are using tape-watch with @babel/register the line should start with:

tape-watch -r @babel/register ...

Kind of obvious when you know it, but took me a while to figure out.

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

8 participants