Skip to content

Commit

Permalink
test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nbonamy committed May 9, 2024
1 parent f5a1f10 commit 8887a0c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/unit/text.test.ts
Original file line number Diff line number Diff line change
@@ -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')
Expand Down

0 comments on commit 8887a0c

Please sign in to comment.