Improve JavascriptGenerator test