javascript mocking proxy