Choice Script Changes To Run Tests With Firefox ver 68 ( See Post 12 & 31)

In the latest version of ChoiceScript up on Github, it’s now somewhat easier to get this stuff to work.

You do still have to install Node.js (one time only). Then, when you download and extract ChoiceScript, you’ll see I’ve added some new scripts to launch the ChoiceScript server.

  • Windows: Double-click on run-server.bat . Windows hides the part of the file name after the dot, so run-server.bat looks like run-server .
    • The first time you run it, Windows will pop up the Windows Defender SmartScreen (“Windows protected your PC”). Click “More Info” and then “Run anyway.”
  • Mac: Double-click on serve.command .
    • The first time you run serve.command on a Mac, double-clicking won’t work. (“‘serve.command’ can’t be opened because it is from an unidentified developer.”) Hold the Control key on your keyboard, click on the serve.command file, and click Open. From now on, double-clicking will work.

Launching the ChoiceScript server will open a window for the server, and it will also open your browser, showing you the example game. You can just refresh your browser to test modifications to your game.

You can stop the server by closing its window. If the server stops, you won’t be able to refresh ChoiceScript in your browser; you’ll need to launch the server again to continue using ChoiceScript.

You can also run Quicktest and Randomtest in a similar way:

  • run-quicktest.bat on Windows, quicktest.command on Mac
  • run-randomtest.bat on Windows, randomtest.command on Mac

Once you’ve jumped through all of the hoops, running the game and the tests is as easy as double-clicking, just like it used to be.

I’ve updated the Introduction to ChoiceScript and the Testing ChoiceScript pages on our website to match these instructions.