Add <anonymous> in stack trace if there is no functionName
Add command using scripts in package.json
Add tests
Remove unused code in test.html
Update version in package lock
Update readme to include test instructions
Problem with issue #21 is due to errors thrown in anonymous scope, V8 stack trace format expects <anonymous> in this case. I've added a simple fallback for this case and some tests to try it (I'm not 100% happy with anonymous one but I have no idea how to throw an error in the global anonymous scope from inside the tests). Still, I think we should review the whole V8 format and check if we cover every case and definitely write tests to cover all the cases.
As for other changes, I've added scripts commands in package.json so no global Gulp required anymore — Readme updated too.
Due to the fact that the sent stacktraces might contain more frames (with ), which might impact the error grouping algorithm, when this change is merged, I will increment the major version of the library.
<anonymous>
in stack trace if there is no functionNameProblem with issue #21 is due to errors thrown in anonymous scope, V8 stack trace format expects
<anonymous>
in this case. I've added a simple fallback for this case and some tests to try it (I'm not 100% happy with anonymous one but I have no idea how to throw an error in the global anonymous scope from inside the tests). Still, I think we should review the whole V8 format and check if we cover every case and definitely write tests to cover all the cases.As for other changes, I've added scripts commands in
package.json
so no global Gulp required anymore — Readme updated too.