Accessing the original module when using mocks Post author By administrator Post date May 31, 2026 No Comments on Accessing the original module when using mocks jest.mock('fs') const fs = require('fs') // Mocked module const fs = require.requireActual('fs') // Original module Tags Jest Cheat Sheet ← Jest: Timer mocks Cheat Sheet → Jest: Clearing and restoring mocks Leave a Reply Cancel replyYour email address will not be published. Required fields are marked *Comment * Name * Email * Website Save my name, email, and website in this browser for the next time I comment.