Created
June 14, 2022 08:07
-
-
Save davidbarral/68c05a2fe458d1f24dbbd24fe0396efe to your computer and use it in GitHub Desktop.
DI middle 1
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
const updateUserPreference = require("./use-cases/update-user-preference.js"); | |
it("updates the user preference", () => { | |
const mockUpdate = jest.fn(); | |
updateUserPreference({ key: "someKey", value: "someValue", { user: { update: mockUpdate } }); | |
expect(mockUpdate).toHaveBeenCalledWith(/* the updatedUser */); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment