mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-18 09:35:20 +02:00
0aba14f581
Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
20 lines
568 B
TypeScript
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');
|
|
});
|
|
});
|