add JS scope chain functional test