Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Comments

Update setup instructions to be clear and add an example project#17

Open
YetAnotherClown wants to merge 6 commits intojsdotlua:main from
YetAnotherClown:update-docs-add-example-game
Open

Update setup instructions to be clear and add an example project #17
YetAnotherClown wants to merge 6 commits intojsdotlua:main from
YetAnotherClown:update-docs-add-example-game

Conversation

@YetAnotherClown
Copy link

@YetAnotherClown YetAnotherClown commented Aug 30, 2024

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.

@YetAnotherClown YetAnotherClown changed the title (削除) Update setup instructions to be clear and add an example game (削除ここまで) (追記) Update setup instructions to be clear and add an example project (追記ここまで) Aug 30, 2024
Copy link

@grilme99 grilme99 left a 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.

Comment on lines 108 to +118
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!
Copy link

@grilme99 grilme99 Mar 5, 2025

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?

Copy link
Author

@YetAnotherClown YetAnotherClown Mar 5, 2025

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.

Copy link

@grilme99 grilme99 Mar 5, 2025

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.)

YetAnotherClown reacted with thumbs up emoji
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@grilme99 grilme99 grilme99 requested changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /