add js function test case