Skip to content

Instantly share code, notes, and snippets.

@mukeshsolanki
Created September 14, 2023 07:35
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 mukeshsolanki/15cd8a59d6502729ab1734231c6979a0 to your computer and use it in GitHub Desktop.
Save mukeshsolanki/15cd8a59d6502729ab1734231c6979a0 to your computer and use it in GitHub Desktop.
// Mock the DataStore
val mockDataStore = mockk<DataStore<Preferences>>()
// Define behavior for DataStore functions
coEvery { mockDataStore.data } returns flowOf(mockedPreferences)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment