Use module root escodegen
Fix test error code