Closed egriff38 closed 3 years ago
Unfortunately we can't get the example running. Does it require special setup? e.g. yarn berry
?
Would you be able to create a working sample repo for us with instructions to configure it?
We've spent a bit of time playing around and were able to get the react-app-ts
example working but ran into a few problems. We needed to add --experimental-vm-modules
to our Wallaby.js configuration (see below) but I don't think this has anything to do with your problem.
wallaby.js configuration
module.exports = () => ({
autoDetect: true,
env: {
type: 'node',
params: {
runner: '--experimental-vm-modules'
}
}
});
We also ran into some problems with source mapping not working properly and when trying to diagnose vite-jest --collectCoverage
causes jest to crash (outside of Wallaby) so not quite sure what's going on there or if this is expected (or just not supported).
@egriff38 - are you able to provide us with a working sample so we can see your problem?
If we don't hear back in the next day or so, we'll close out the issue for now.
https://github.com/egriff38/vite-storybook-template Here is a sample for my repo. Sorry for the delay.
I added the wallaby.js
configuration file suggested above and Wallaby runs your project but it's doing some strange things (not behaving correctly). I also see some weird behavior in your tests outside of Wallaby. If I change your test to:
import { mount } from "@vue/test-utils";
import UploadSpreadsheet from "./uploadSpreadsheet.vue";
test("hello world", async () => {
const wrapper = mount(UploadSpreadsheet);
+ console.log(wrapper.html());
expect(wrapper.html()).toMatchSnapshot();
});
The test/snapshot fails. This doesn't look right. Additionally, it looks like adding the console.log
actually forces wrapper.html()
to produce the correct value (previous value looks wrong unless I'm missing something).
Before we start troubleshooting Wallaby, I want to make sure that we correctly identify the behavior when not running Wallaby (and fix that if required).
@egriff38 - were you able to take a look at the strange behavior when using vite-jest
from the CLI?
I’ll be reviewing it today On Sep 1, 2021, 5:49 PM -0400, Simon McEnlly @.***>, wrote:
@egriff38 - were you able to take a look at the strange behavior when using vite-jest from the CLI? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
Closing this issue as we haven't heard back. Will re-open if/when we receive a reply.
Issue description or question
I'd like to use the vite-jest preset to run my tests (my repo is a modified version of the example here). I can run my project tests directly via the
vite-jest
command, and it picks up the single test file, and generates the proper snapshot (not included). But starting up wallaby does not show any tests to be run.Below are my files.
wallaby.conf.js
jest.config.js
src/components/uploadSpreadsheet/uploadSpreadsheet.test.tsx
package.json
Wallaby diagnostics report