hbenl / vscode-jasmine-test-adapter

Jasmine Test Adapter for the VS Code Test Explorer
MIT License
20 stars 20 forks source link

TypeError: Cannot read property 'match' of null #65

Closed alann-maulana closed 2 years ago

alann-maulana commented 2 years ago

I'm working to track a bug in parse-server. When running on test, I found stack :

Suite error: Parse.User testing
  Message:
    TypeError: Cannot read property 'match' of null
  Stack:
        at <Jasmine>
        at /Users/Maulana/.vscode/extensions/hbenl.vscode-jasmine-test-adapter-1.8.0/out/worker/runTestsReporter.js:28:31
        at <Jasmine>
        at RunTestsReporter.specDone (/Users/Maulana/.vscode/extensions/hbenl.vscode-jasmine-test-adapter-1.8.0/out/worker/runTestsReporter.js:26:54)
        at <Jasmine>

Ran 1 of 2955 specs
1 spec, 2 failures
Finished in 2.028 seconds

Within runTestsReporter.js:28:31 :

if (stack.match(/\s+at/)) {

a simple fix by adding a validation if stack != null :

if (stack && stack.match(/\s+at/)) {
hbenl commented 2 years ago

Fixed in version 1.8.2. Thanks for tracking this down.