Last active
July 24, 2016 09:49
-
-
Save FagnerMartinsBrack/ae7af0553c9e90153cca464546f1464f to your computer and use it in GitHub Desktop.
(Medium) Mocking Can Lead To False Positives - Proper Test With A Number Instance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test("Add to index should be called with the input", function() { | |
const mockedDatabasePersist = mockDatabasePersist(); | |
const fakeIndex = new Number(5); | |
addIndexToDatabase(fakeIndex); | |
expect(mockedDatabasePersist).toHaveBeenCalledWith(fakeIndex); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment