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

output stream error #159

Open
syarul opened this issue Aug 17, 2021 · 4 comments
Open

output stream error #159

syarul opened this issue Aug 17, 2021 · 4 comments

Comments

@syarul
Copy link

syarul commented Aug 17, 2021

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.
@juliangruber
Copy link
Owner

Can you share more about your setup? Did you follow this tutorial https://github.com/juliangruber/tape-run#with-webpack?

@juliangruber
Copy link
Owner

Could you share your test file too?

@syarul
Copy link
Author

syarul commented Aug 18, 2021

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

@syarul
Copy link
Author

syarul commented Aug 18, 2021

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) => {
  \\
});

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

2 participants