Closed Portur closed 11 months ago
Seems the same is happening in VSCode.
Results like this below where sinon
is not defined anywhere. Not sure what sinon
is supposed to be here:
// Stub the knex insert method to return the newPlace mock
const knexStub = sinon.stub(placesDBMock.knex, "insert").returns({
into: sinon.stub().returns({
onConflict: sinon.stub().returns({
merge: sinon.stub().returns({
returning: sinon.stub().returns([newPlace]),
}),
}),
}),
});
Hello @Portur have you clicked on the "regenerate" button after you select all your configurations?
Yes, I went through a few attempts clicking regenerate to test or force vitest, with no luck
@oranshiner can you please take a look?
Thanks for reporting @Portur!
Can you please share your request ID for an example when this occurs?
@mrT23 FYI
Just checked and Mocha test framework is remembered between requests for invocation either from selection or from inlays for JS/TS languages. @Portur could you please reproduce the issue? And if so could you share any piece of code the issue is reproduceable, please?
Seems like we fixed it in latest versions, please feel free to report if experience it again!
If you highlight a piece of code and select "generate tests" the window will open and you can select "Test Framework" and enable "Auto-Mock" for Jest, Mocha, Vitest, etc...
All generated tests keep generating Jest examples. Whether I select Vitest or Mocha.
Even after giving "Reference test examples" that use
vi.mock
orsomeFunctionMock.mockImplementationOnce
it keeps generatingjest.fn().mockResolvedValue(...)
in the results.Build info
IntelliJ IDEA 2023.2.1 (Ultimate Edition) Build #IU-232.9559.62, built on August 23, 2023
Runtime version: 17.0.8+7-b1000.8 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 13.5.1 GC: G1 Young Generation, G1 Old Generation Memory: 4048M Cores: 10 Metal Rendering is ON Registry: ide.experimental.ui=true
Kotlin: 232-1.9.0-IJ9559.62
┆Issue is synchronized with this Trello card by Unito