Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential incompatibility with jest-lua #14

Closed
vocksel opened this issue Dec 7, 2024 · 1 comment
Closed

Potential incompatibility with jest-lua #14

vocksel opened this issue Dec 7, 2024 · 1 comment

Comments

@vocksel
Copy link

vocksel commented Dec 7, 2024

I'm working on a PR to migrate Flipbook over to Pesde (flipbook-labs/flipbook#293) and when running unit tests I'm finding that Jest is erroring for all of them with the following:

  ● Test suite failed to run

    unable to find environment 'jest-environment-roblox'

      ReplicatedStorage.Packages..pesde.wally#jsdotlua+jest-runner.3.6.1-rc.2.jest-runner.runTest:160
      ReplicatedStorage.Packages..pesde.wally#jsdotlua+promise.3.5.2.promise:172 function runExecutor
      ReplicatedStorage.Packages..pesde.wally#jsdotlua+promise.3.5.2.promise:181
      ReplicatedStorage.Packages..pesde.wally#jsdotlua+promise.3.5.2.promise:1245
      ReplicatedStorage.Packages..pesde.wally#jsdotlua+promise.3.5.2.promise:172 function runExecutor
      ReplicatedStorage.Packages..pesde.wally#jsdotlua+promise.3.5.2.promise:299

It seems like Jest's traversal up its ancestry may be getting tripped up by Pesde's index structure. Here's some relevant line's from the runTest function that's failing:

https://github.com/jsdotlua/jest-lua/blob/main/src/jest-runner/src/runTest.lua#L151-L162

@daimond113
Copy link
Member

Good catch! The issue stems from the fact Wally nests their dependencies a level less than pesde, since they name their _Index entries as {scope}_{name}@{version} while pesde uses a subfolder such as {scope}+{name}/{version}. This will be fixed in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants