How can I create a unit test for a memory dump without mocking? In Javascript, I have these two functions: