Comments (3)
I found a better solution: When no javascript is written to it, an error is thrown. In the example above, there's only the warning printed to stderr, but stdout is empty.
Starting at version 1.1.0
, this will happen:
∴ tape-run (master) : browserify missing.js | tape-run
Error: Cannot find module '/Users/julian/dev/juliangruber/tape-run/missing.js' from '/Users/julian/dev/juliangruber/tape-run'
at /usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:55:21
at load (/usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:69:43)
at onex (/usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:92:31)
at /usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:22:47
at Object.oncomplete (fs.js:108:15)
stream.js:94
throw er; // Unhandled stream error in pipe.
^
Error: javascript required
at Stream.<anonymous> (/Users/julian/dev/juliangruber/tape-run/node_modules/browser-run/index.js:25:34)
at _end (/Users/julian/dev/juliangruber/tape-run/node_modules/browser-run/node_modules/through/index.js:61:9)
at Stream.stream.end (/Users/julian/dev/juliangruber/tape-run/node_modules/browser-run/node_modules/through/index.js:70:5)
at Stream.method [as end] (/Users/julian/dev/juliangruber/tape-run/node_modules/browser-run/node_modules/duplexer/index.js:51:39)
at Stream.<anonymous> (/Users/julian/dev/juliangruber/tape-run/node_modules/throughout/index.js:7:25)
at _end (/Users/julian/dev/juliangruber/tape-run/node_modules/through/index.js:65:9)
at Stream.stream.end (/Users/julian/dev/juliangruber/tape-run/node_modules/through/index.js:74:5)
at Stream.onend (stream.js:79:10)
at Stream.emit (events.js:117:20)
at drain (/Users/julian/dev/juliangruber/tape-run/node_modules/through/index.js:34:23)
∴ tape-run (master) : echo $?
8
from tape-run.
Hey, thanks for tape-run. I'm switching from Mocha to Tape and your tools are really cool to work with.
To the point. I have encountered this javascript required
error few times already and did not understood what what it meant until I found this by pure chance while browsing the issues. I think the error message could be more verbose, something like:
Error: No javascript was provided for the browser.
from tape-run.
hey @lzrski, that's a great suggestion, would you mind making a pull request with this change? :)
from tape-run.
Related Issues (20)
- how can I include a js file? HOT 11
- Inconsistent environments for `tape-run` and `tape-run -p` HOT 1
- window.location.search goes wild HOT 5
- Doesn't say much upon errors HOT 7
- support for other bundler webpack and rollup HOT 2
- webpack-tape-run HOT 1
- `</script>` tags inside the JS input causing errors. HOT 1
- How to resize the browser window HOT 3
- How to reset browser window state between tests? HOT 2
- Weird static files behaviour with and without --port HOT 7
- Errors on Travis HOT 2
- Pipe to "tap-mocha-reporter" doesn't work
- Doesn't work on Ubuntu 18.04 HOT 5
- Outdated Deps? HOT 3
- internal/streams/legacy.js:59 unhandled stream error on pipe HOT 1
- --node and --basedir appear to not be working HOT 3
- Does not work in WSL HOT 3
- Use a more recent browser-run version to pass the no-sandbox option to electron-stream HOT 2
- option `--browser=chrome` not working HOT 4
- tape-run is triggering some dependabot alerts HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tape-run.