Smalruby3 GUI is a set of React components that comprise the interface for creating and running Smalruby 3.0 projects. It forked from LLK/scratch-gui .
This requires you to have Git and Node.js installed.
In your own node environment/application:
npm install https://github.com/smalruby/smalruby3-gui.gitIf you want to edit/play yourself:
git clone https://github.com/smalruby/smarluby3-gui.git
cd smarluby3-gui
npm installRunning the project requires Node.js to be installed.
Open a Command Prompt or Terminal in the repository and run:
npm startThen go to http://localhost:8601/ - the playground outputs the default GUI component
You may want to review the documentation for Jest and Enzyme as you write your tests.
See jest cli docs for more options.
NOTE: If you're a windows user, please run these scripts in Windows cmd.exe instead of Git Bash/MINGW64.
Before running any test, make sure you have run npm install from this (scratch-gui) repository's top level.
To run linter, unit tests, build, and integration tests, all at once:
npm testTo run unit tests in isolation:
npm run test:unitTo run unit tests in watch mode (watches for code changes and continuously runs tests):
npm run test:unit -- --watchYou can run a single file of integration tests (in this example, the button tests):
$(npm bin)/jest --runInBand test/unit/components/button.test.jsxIntegration tests use a headless browser to manipulate the actual html and javascript that the repo produces. You will not see this activity (though you can hear it when sounds are played!).
Note that integration tests require you to first create a build that can be loaded in a browser:
npm run buildThen, you can run all integration tests:
npm run test:integrationOr, you can run a single file of integration tests (in this example, the backpack tests):
$(npm bin)/jest --runInBand test/integration/backpack.test.jsIf you want to watch the browser as it runs the test, rather than running headless, use:
USE_HEADLESS=no $(npm bin)/jest --runInBand test/integration/backpack.test.jssee Scratch's document: Read the wiki for a step-by-step guide.
