-
Notifications
You must be signed in to change notification settings - Fork 5
Update setup instructions to be clear and add an example project #17
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
base: main
Are you sure you want to change the base?
Update setup instructions to be clear and add an example project #17
Conversation
Documentation now provides clear instructions on how to use Jest Lua
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this! Requested some changes.
Before you can run your tests, you need to enable the `debug.loadmodule` API. To do this, you must enable the `FFlagEnableLoadModule` flag. See issue [#3](https://github.com/jsdotlua/jest-lua/issues/3) for more. | ||
|
||
To manage FastFlags for Studio, it is recommended that you use [Roblox Studio Mod Manager](https://github.com/MaximumADHD/Roblox-Studio-Mod-Manager) to set the `FFlagEnableLoadModule` FFlag to true. Or, you can edit your `ClientAppSettings.json` yourself. | ||
|
||
```json title="ClientAppSettings.json" | ||
{ | ||
"FFlagEnableLoadModule": true | ||
} | ||
``` | ||
|
||
Finally, run your project using Roblox Studio or `run-in-roblox` to run the tests and your tests should pass! | ||
Finally, run your project using Roblox Studio or use [run-in-roblox](https://github.com/rojo-rbx/run-in-roblox) to run the tests and your tests should pass! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't technically related to your PR, but debug.loadmodule
is no longer necessary to run Jest, so that whole line can just be removed. Alternatively, you could add an info block that it is necessary in older versions.
run-in-roblox
also isn't necessary anymore thanks to Open Cloud execution. Not sure if this is the best time to change that line though since we don't have a good out-of-the-box story for running Jest in Open Cloud yet. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, that's cool. I didn't know debug.loadmodule
was no longer needed, I guess I need to update my dependencies.
As for run-in-roblox
, I think we leave it for now and decide again on this in the future. I do think we could expand the documentation and provide the different options users have for running Jest in the future though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you change the example project to not be using Darklua? It complicates a minimal example and we'll also eventually be moving away from it for most Roblox code thanks to native string requires (though Jest doesn't support this yet.)
The current documentation provides setup instructions for Roblox Employees, this has been updated to provide usable examples for members of the community.
An example game has also been added in which the setup examples are used in, this provides a clear and usable example of how to use Jest Lua for a Roblox library.