Created
July 24, 2020 00:21
-
-
Save dejanvasic85/c3e85479de3a75211271712595f9b949 to your computer and use it in GitHub Desktop.
Revisions
-
dejanvasic85 created this gist
Jul 24, 2020 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ import * as dateService from './dateService'; const nowMock = dateService.now as jest.MockedFunction<typeof dateService.now>; describe('some service', () => { const mockNow = 'now'; beforeEach(() => { nowMock.mockReturnedValue(mockNow); }); });