Example of unit test for MM dispatcher

Example of a unit test for the MM dispatcher. Since the browser based tests are easier to run and debug, my example is using that (as opposed to the nodejs / command line). This meant that I've moved the functions to the MatchMakerUtilities function, as the MMFramework.js dependencies means it cant run in the browser.

You  can run the test by opening the file: /universal/tests/html/all-tests.html in firefox. If you click "Rerun" on the MM tests (on the listed tests in the browser), it will run only those, and you can do this on it's individual tests until you only run your own tests. If the tests fails, you should go to the URL about:config  (no http:// or anything in front) and edit the "security.fileuri.strict_origin_policy" value to be false.

The test for the dispatcher is this part: https://github.com/kaspermarkus/universal/blob/MM-dispatcher/gpii/node_modules/matchMakerFramework/test/js/MatchMakerUtilitiesTests.js#L424-L448 .. you can add new fixtures in the array https://github.com/kaspermarkus/universal/blob/MM-dispatcher/gpii/node_modules/matchMakerFramework/test/js/MatchMakerUtilitiesTests.js#L425-L440 - with descriptions, expected and input as appropriate for the cases that you're testing.. We use this to verify that the various cases of the function work as expected (and continue to do so) but also for documenation purposes so it's clear for the reviewer and other implementers what the function does and is expected from it