browser-run
browser-run copied to clipboard
output stream error
Having issue with tape-run v6 upwards which base on browser-run 6.
> webpack --config webpack.test.js
TAP version 13
# test success
ok 1 should be equal
Error: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'webpack://webpack-tape-run/./node_modules/tape/lib/test.js?'.
at Array.<anonymous> (http://localhost:54901/reporter.js:6627:9)
at http://localhost:54901/reporter.js:6604:24
at retrieveSourceMapURL (http://localhost:54901/reporter.js:6675:14)
at Array.<anonymous> (http://localhost:54901/reporter.js:6692:26)
at http://localhost:54901/reporter.js:6604:24
at mapSourcePosition (http://localhost:54901/reporter.js:6722:21)
at wrapCallSite (http://localhost:54901/reporter.js:6894:20)
at http://localhost:54901/reporter.js:6929:26
at Array.map (<anonymous>)
at Function.prepareStackTrace (http://localhost:54901/reporter.js:6928:24)
# C:\Users\hotti\distro\webpack-tape-run\test.js: line 7, column 3-9
t.end()
^^^^^^^
# coverage: 13/14 (92.85 %)
asset test.js 296 KiB [compared for emit] (name: main)
runtime modules 221 bytes 1 module
modules by path ./node_modules/ 241 KiB 48 modules
./test.js 1.39 KiB [built] [code generated]
fs (ignored) 15 bytes [built] [code generated]
./util.inspect (ignored) 15 bytes [built] [code generated]
buffer (ignored) 15 bytes [built] [code generated]
util (ignored) 15 bytes [built] [code generated]
buffer (ignored) 15 bytes [built] [code generated]
util (ignored) 15 bytes [built] [code generated]
buffer (ignored) 15 bytes [built] [code generated]
ERROR in tests failed
ERROR in test reporter non-zero exit code
webpack 5.50.0 compiled with 2 errors in 2431 ms
npm ERR! Test failed. See above for more details.
Can you share more about your setup? Did you follow this tutorial https://github.com/juliangruber/tape-run#with-webpack?
Could you share your test file too?
You can clone https://github.com/syarul/webpack-tape-run/tree/tape-run-v9
npm install
npm test
the test file
var test = require('tape')
test('test success', function(t) {
t.plan(2)
t.equal(1, 1)
t.equal('foo', 'bar')
t.end()
})
I put extra logging to the code, the issue might be related to electron-stream, since this commit is the start of the error, only occurs on failing test, but on success does not happen. You can check the appveyor ci test to see the logging output
IMO, I think this similar to node.js on how to handle uncaughtException
. Where you need to feed the error back the tape-run, so that test will continue on failing
process.on('uncaughtException', (err, origin) => {
\\
});