flipbook
flipbook copied to clipboard
Run tests in dev mode
Problem
Tests can only be run manually via ./bin/test.sh
which is usually good enough, but it would be helpful to have tests run when files are changed
Solution
Tests are now run in Studio when using the dev project, and when using an accompanying build and watch command this will allow tests to run on file changes
To get this all working I've made some pretty extensive changes:
- Added a new
DEV_MODE
BoolValue to replaceconstants.IS_DEV_MODE
. This BoolValue is only set indev.project.json
- Updated tests for
useZoom
,useDescendants
,useEvent
, andstores.spec.lua
to get everything passing in Studio -
stories.spec.lua
was tricky, and I wound up creating a bunch of helper functions for the discovery and loading of storybooks and stories. With tests!
Also some other minor changes I made are:
- Made Luau LSP aware of our TestEZ type defs so there are no more red squiggles in vscode
- Removed the allow rule for global_usage
Checklist
- [ ] Ran
./bin/test.sh
locally before merging