jest-preview icon indicating copy to clipboard operation
jest-preview copied to clipboard

Testing `jest-preview` in multiple platforms

Open nvh95 opened this issue 3 years ago • 6 comments

What & Why

  • jest-preview is developed and tested on macOS. So we are not sure if it works on other platforms:
    • OS: Windows, linux...
    • Monorepo: lerna, turborepo...

How

  • We should find a way to make sure this library works on other platforms:
    • Seeking helps from contributors to test on other platforms
    • Setup CI/CD to run tests automatically

nvh95 avatar Apr 06 '22 02:04 nvh95

@all-contributors please add @ntbinh-Harvey for test

nvh95 avatar Apr 06 '22 02:04 nvh95

@nvh95

I've put up a pull request to add @ntbinh-Harvey! :tada:

allcontributors[bot] avatar Apr 06 '22 02:04 allcontributors[bot]

Hi there! I'm currently running Jest + Jest-Preview in WSL. I've tried using the npm-run-all approach, running the jest-preview server separately, and calling the manual debug() vs jestPreviewConfigure({ autoPreview: true }) and none of the approaches seem to work. Jest just runs normally and skips past the debug() call. I imagine its probably something to do with WSL, but figured I'd report it here! I'll work on getting a reproduction in place.

KonnorRogers avatar Jul 07 '22 14:07 KonnorRogers

Hi @ParamagicDev. Thank you for reporting this issue to us. I haven't tried Jest Preview in WSL, also, we are having an issue on Linux that the Jest Preview Dashboard does not automatically reload (#138). I think this might be related.

Jest just runs normally and skips past the debug() call

I'm not sure I understand this one yet. Can you do us a favor by creating another issue, describe what issues are you facing with a reproduction? It will be easier for us to track the issue on WSL, and of course, reproduce and fix the bug.

Thank you again.

nvh95 avatar Jul 07 '22 16:07 nvh95

@nvh95 The only current reproduction I have is my Shadow Dom Testing library here:

https://github.com/ParamagicDev/shadow-dom-testing-library

it should be just:

git clone https://github.com/ParamagicDev/shadow-dom-testing-library
cd shadow-dom-testing-library
npm install

# Modify a file to include the jest-preview
npm run test

KonnorRogers avatar Jul 07 '22 18:07 KonnorRogers

@ParamagicDev Can you please update jest-preview to the newest version (>= 0.2.8) then try again. We fix that issue in https://github.com/nvh95/jest-preview/pull/200. Thanks.

nvh95 avatar Jul 16 '22 09:07 nvh95

We tested the core function of jest-preview on

  • [x] Mac (development machine)
  • [x] Ubuntu
  • [x] Windows

We also have CI to run on Ubuntu and Windows (GitHub Actions)

We also run it in some monorepo.

nvh95 avatar Aug 16 '22 17:08 nvh95