Closed geon closed 3 years ago
Thanks for filing this issue!
The logging definitely needs some improvements. I'll try and work on that this week. Any suggestions as to what the output could look like are welcome.
Current:
Root
MeshTestSuite
√ makeEmptyMesh
√ addEdge
√ makeLongEdgeMesh
x extrudeCornerOnEdge - Bad id: -1
√ meshGraphIsValid
Better:
Root
MeshTestSuite
√ makeEmptyMesh
√ addEdge
√ makeLongEdgeMesh
x extrudeCornerOnEdge - Uncaught Error: Bad id: -1
at Object.makeTestMesh (Mesh.ts?763c:198)
at eval (main.ts?34d3:6)
at Object../src/main.ts (bundle.js:248)
at __webpack_require__ (bundle.js:488)
at bundle.js:552
at bundle.js:555
√ meshGraphIsValid
I basically just copied how Chrome prints thrown errors.
This also goes for expect.not.toThrow
. If it is not expected to throw, the thrown error should probably be shown.
That's pretty clean! The stack was making the log a bit crowded, so I made the test suites bold to facilitate scanning.
This will be deployed in version ~2.0.0-beta.1
~ in a few minutes. Let me know if you get the change to test it!
Edit:
Actually, it was deployed in version 2.0.0-beta.2
. 2.0.0-beta.1
was deployed by error a while ago apparently. 🤷♂️
That looks perfect.
❤
It would be nice to know where the errors comes from. Print at least the line number. Possibly the entire stack trace.