You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-23 22:36:32 +02:00
Chore: Remove file created during automated test (#11915)
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
const { shimInit } = require('./shim-init-node');
|
const { shimInit } = require('./shim-init-node');
|
||||||
import shim from './shim';
|
import shim from './shim';
|
||||||
import { setupDatabaseAndSynchronizer, supportDir } from './testing/test-utils';
|
import { createTempDir, setupDatabaseAndSynchronizer, supportDir } from './testing/test-utils';
|
||||||
import { copyFile } from 'fs-extra';
|
import { copyFile } from 'fs-extra';
|
||||||
|
|
||||||
describe('shim-init-node', () => {
|
describe('shim-init-node', () => {
|
||||||
@@ -19,8 +19,11 @@ describe('shim-init-node', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('should preserve the file extension if one is provided regardless of the mime type', async () => {
|
test('should preserve the file extension if one is provided regardless of the mime type', async () => {
|
||||||
|
const tempDir = await createTempDir();
|
||||||
|
|
||||||
const originalFilePath = `${supportDir}/valid_pdf_without_ext`;
|
const originalFilePath = `${supportDir}/valid_pdf_without_ext`;
|
||||||
const fileWithDifferentExtension = `${originalFilePath}.mscz`;
|
const fileWithDifferentExtension = `${tempDir}/valid_pdf.mscz`;
|
||||||
|
|
||||||
await copyFile(originalFilePath, fileWithDifferentExtension);
|
await copyFile(originalFilePath, fileWithDifferentExtension);
|
||||||
|
|
||||||
const resource = await shim.createResourceFromPath(fileWithDifferentExtension);
|
const resource = await shim.createResourceFromPath(fileWithDifferentExtension);
|
||||||
|
|||||||
Reference in New Issue
Block a user