UNPKG

frontmatter-file-batcher

Version:

Asynchronous bulk edit utility for Front Matter powered Markdown files

14 lines (10 loc) 385 B
const remove = require('./') // No need to have a separate mock file for it, just calling this is fine jest.mock('./index.js') describe('remove:', () => { it('should be called', async () => { await remove('/path/to/foo.md', { glob: false }) // Simply test that it gets celled, that's all expect(remove).toHaveBeenCalledWith('/path/to/foo.md', { glob: false }) }) })