Skip to content

Instantly share code, notes, and snippets.

@FagnerMartinsBrack
Last active July 24, 2016 09:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FagnerMartinsBrack/eda5b8680776c3605a5a7a2e101395ca to your computer and use it in GitHub Desktop.
Save FagnerMartinsBrack/eda5b8680776c3605a5a7a2e101395ca to your computer and use it in GitHub Desktop.
(Medium) Mocking Can Lead To False Positives - Alternative Generative Testing
test("Add to index should be called with the input", function() {
const mockedDatabasePersist = mockDatabasePersist();
const undefinedInput = undefined;
addIndexToDatabase(undefinedInput);
expect(mockedDatabasePersist).toHaveBeenCalledWith(undefinedInput);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment