diff --git a/tests/unit/text.test.ts b/tests/unit/text.test.ts index cb98a23..c117eb0 100644 --- a/tests/unit/text.test.ts +++ b/tests/unit/text.test.ts @@ -1,8 +1,16 @@ import { getTextContent } from '../../src/main/text' -import { expect, test } from 'vitest' +import { vi, expect, test } from 'vitest' import fs from 'fs' +vi.mock('electron', async() => { + return { + app: { + getPath: vi.fn() + } + } +}) + test('TXT', async () => { const contents = fs.readFileSync('./tests/fixtures/sample.txt', 'base64') const text = await getTextContent(contents, 'txt')