Write tests for javascript compiler