connorshea / vscode-ruby-test-adapter

A Ruby test adapter extension for the VS Code Test Explorer
https://marketplace.visualstudio.com/items?itemName=connorshea.vscode-ruby-test-adapter
MIT License
83 stars 50 forks source link

Handle results with no klass property #46

Closed dwarburt closed 3 years ago

dwarburt commented 4 years ago

I'm not sure why my project test results don't have this property, but it was preventing the results from being displaying correctly because the ruby child would crash on this line. It works fine after these changes.

connorshea commented 3 years ago

Could you explain exactly what the problem being solved here is? And how I could test it? Just want to make sure this actually fixes a problem :)

dwarburt commented 3 years ago

sure, problem was that the ruby child process that is spawned would crash on this line because .klass resolved to nil for the variable r in my project. I was only able to determine this after adding the block in test.ts that can capture the stderr from the child process (because that's where the exception stacktrace appeared). When I added a workaround for the nil .klass then the extension worked again.

I'll work on putting together a minimal reproduction.

dwarburt commented 3 years ago

I can't reproduce the issue now. From what I remember the symptoms were identical to what was reported in #28 but the repo that @Signum had in that thread to reproduce the issue is 404 now.

connorshea commented 3 years ago

I'll close this since we can't figure out how to reproduce it.