adrigzr / neotest-mocha

Neotest runner for Mocha test framework
10 stars 9 forks source link

feat: parse non arrow functions in namespaces and test #3

Closed srihari93 closed 1 year ago

srihari93 commented 1 year ago

The parser is not detecting the namespaces and tests if functions are used instead of arrow functions, the below items are not detected.

describe('block', function (){
...
})
it('block', function (){
...
})

I changed the treesitter querries to accommodate non arrow functions.

Unfortunately, I do not know how to run the test, tried lua test/basic_spec.lua, it did not work. However, the changes do work as expected, I tested these changes in neovim. Kindly give some guidance on testing or please feel free to takeover.

srihari93 commented 1 year ago

@adrigzr Help needed in finishing this PR

adrigzr commented 1 year ago

Hello @srihari93, this should be fixed in #4. Could you check it out?

srihari93 commented 1 year ago

@adrigzr Checked #4. The issue is fixed, please close this PR and merge #4