move Js-specific optimization test to TestJs