1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-18 09:35:20 +02:00
joplin/packages/lib/shim-init-node.test.ts
pedr 0aba14f581
Desktop,CLI: Fixes #10653: Change Resource filetype detecting strategy (#10907)
Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
2024-11-07 13:46:08 +00:00

20 lines
568 B
TypeScript

const { shimInit } = require('./shim-init-node');
import shim from './shim';
import { setupDatabaseAndSynchronizer, supportDir } from './testing/test-utils';
describe('shim-init-node', () => {
beforeEach(async () => {
await setupDatabaseAndSynchronizer(1);
shimInit();
});
test('should set mime the correct mime for a PDF file even if the extension is missing', async () => {
const filePath = `${supportDir}/valid_pdf_without_ext`;
const resource = await shim.createResourceFromPath(filePath);
expect(resource.mime).toBe('application/pdf');
});
});