I am doing some unit test exercises using a HTML5/JS game I wrote and JSUnit test runner. I am satisfied by the simplicity of it but that simplicity goes even in the docs as there is no explanation what trully assertEquals() does.
I made a stub aka fake object of my preloader and I want to check its state against this fake preloader.
I used assertEquals(gamePreloader, myPreloader) but the test fails with error:
Expected <[object Object]> (Object) but was <[object Object]> (Object)
Meaning they are not the same objects.
Does assertEquals() checks for the state of the objects or does it checks in memory that those two objects are actually the same object?