Fixes to trailing comma supression.
Test case: added 2 tests to 'test-js-app'.