amiceli / vitest-cucumber

Use gherkin in your unit tests with vitest
https://vitest-cucumber.miceli.click
25 stars 2 forks source link

Update Vitest dependency to `^1.5.3` #70

Closed charlieforward9 closed 1 month ago

charlieforward9 commented 1 month ago

I am trying to configure browser mode to scripts run with web workers. When I run npm i @vitest/browser:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: agroview2@0.0.0
npm ERR! Found: vitest@1.5.1
npm ERR! node_modules/vitest
npm ERR!   vitest@"^1.0.3" from @amiceli/vitest-cucumber@3.2.3
npm ERR!   node_modules/@amiceli/vitest-cucumber
npm ERR!     dev @amiceli/vitest-cucumber@"^3.2.3" from the root project
npm ERR!   peerOptional vitest@">= 0.32" from @testing-library/jest-dom@6.4.2
npm ERR!   node_modules/@testing-library/jest-dom
npm ERR!     dev @testing-library/jest-dom@"^6.4.2" from the root project
npm ERR!   3 more (@vitest/coverage-v8, @vitest/web-worker, the root project)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! @vitest/browser@"*" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: vitest@1.5.3
npm ERR! node_modules/vitest
npm ERR!   peer vitest@"1.5.3" from @vitest/browser@1.5.3
npm ERR!   node_modules/@vitest/browser
npm ERR!     @vitest/browser@"*" from the root project
amiceli commented 1 month ago

Ok, I will update vitest version and test it. I will publish a new version with it ;).

amiceli commented 1 month ago

@charlieforward9 I've publish a beta version 3.2.4-beta.1. I've tried on projects it's ok. Can you check if it's OK for you ?

charlieforward9 commented 1 month ago

Looks good, thank you.

amiceli commented 1 month ago

Thanks, I published a stable version. You can install 3.2.4

charlieforward9 commented 1 month ago

Thank you, I opened this up in the vitest repo that may be related to vitest-cucumber. Can you verify ?

https://github.com/vitest-dev/vscode/issues/368

@amiceli

amiceli commented 1 month ago

I took a look, I create tests with medium size title. I has same result for tests with or without vitest-cucumber.

This is due to title reported by Vitests. Same thing reported in vitest vscode issue you opened.

charlieforward9 commented 1 month ago

Hello, if you look back at https://github.com/vitest-dev/vscode/issues/368, youll see that Vitest is not stringifying the test names. I am still facing the issue. I imagine that means it is being done in this library?

amiceli commented 1 month ago

I took a look, maybe it's due to this code in vitest-cucumber :

test.each(scenarioStepsToRun)(`$key`, async (scenarioStep) => {
    await scenarioStep.fn()
    scenarioStep.step.isCalled = true
})

I will check if I replace backtick with string.

amiceli commented 1 month ago

@charlieforward9 Bug really come from with this code.

I use arrays of object with test.each instead of arrays of array. I'm working on it to fix this, I open an issue for it ;).