Last active
July 24, 2016 09:43
-
-
Save FagnerMartinsBrack/02f94f764b7d703f5bc6c6d784dfe5f3 to your computer and use it in GitHub Desktop.
(Medium) Mocking Can Lead To False Positives - Nondeterministic Test
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 = 5; | |
addIndexToDatabase(fakeIndex, mockedDatabasePersist); | |
expect(mockedDatabasePersist).toHaveBeenCalledWith(fakeIndex); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment