Open Morriz opened 2 years ago
That's strange. Is the project where this happens public or do you have a sample project for me to reproduce? Otherwise perhaps the diagnostic log contains some hints. Right now my only idea how this could happen is that this extension runs mocha differently than npm test
does, so check the diagnostic log for the mocha options that are being used and also the version of node and mocha that the extension uses.
I think the error is very explicit, and we send a very long bearer token. Is there a limit to that? Maybe it can be stretched?
Neither mocha nor this extension has anything to do with the sending of the bearer token (and if there is a limit to that, it is not defined in mocha or this extension), that's why I find it so strange that the extension gives different results than npm test
.
Aha, but theoretically it might very well be a bug in vscode itself then.
This error is coming from the debug console when the explorer runs the tests:
Could not read source map for file:///xx/src/api/apps/%7BteamId%7D.ts: ENAMETOOLONG: name too long, open '/xx/api/apps/{tdata:application/json;charset=utf-8;base64,eyJ2...[rest of beare token here]`
I will also search vscode repo for a match.
As you can see the filename contains brackets: {teamId}.ts
. That is probably not handled well.
I saw only two occurences of ENAMETOOLONG
in the vscode repo, but none referring to reading source map files.
Hi, in this extension we get a false error in our test suite (which runs 100% correct with
npm test
).We notice in the debug output complaints about
ENAMETOOLONG: name too long, open ...
, with a long string that includes the bearer token we send along.Test body:
So my question is, is this the right location or is this handled by the native vscode explorer?