Closed ytw0728 closed 3 months ago
Hi @ytw0728 ,
Your issue is a good point ;). I make some search about it and I found posts and/or framework docs using both solutions : same folder or different folders.
So I will work on it to allow both ways. I will show you it on this issue and you will give me your opinion ;)
@ytw0728 , I found a solution to load feature file in both ways. If you want, you can check code in #50 .
I'm working on it to improve my unit tests for it.
It's done, I have published a new version https://github.com/amiceli/vitest-cucumber/releases/tag/v3.2.3 You can install new version to use relative path ;).
@amiceli Thanks for your super fast solving!!! It looks much better than what I requested.
Have a wonderful one!
outline
as-is
to-do
explanation
Hello there! I think the base path of loadFeature on as-is could cause a little trouble when we move a spec (or test) file to another path. (whenever that happens, it seems that we need to change each path that is passed to loadFeature as a parameter.)
so, I suggest changing the base path of it to the caller file's paths. or what do you think about making a loader for the feature file and connecting its result with your package?
I appreciate your efforts for this package.
related link
https://github.com/amiceli/vitest-cucumber/blob/10f97b60481e02a3e8554399218eac55f04f9a0a/src/vitest/load-feature.ts#L9-L10