Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
myrotvorets-team committed Sep 18, 2023
1 parent fee5a9c commit 8e67e65
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/controllers/upload.mts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as fastglob from 'fast-glob';
import { Environment, environment } from '../lib/environment.mjs';
import { UploadService } from '../services/upload.mjs';

const { glob } = fastglob;
const glob = fastglob.default;

interface UploadParams extends Record<string, string> {
guid: string;
Expand Down
6 changes: 2 additions & 4 deletions test/functional/controllers/upload.test.mts
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ describe('Upload', () => {
mkdir: mkDirMock,
});

await td.replaceEsm('fast-glob', {
glob: globMock,
});
await td.replaceEsm('fast-glob', null, globMock);

upload = await import('../../../src/services/upload.mjs');
const { configureApp } = await import('../../../src/server.mjs');
Expand All @@ -74,7 +72,7 @@ describe('Upload', () => {

app = express();
app.disable('x-powered-by');
await configureApp(app);
return configureApp(app);
});

afterEach(() => (process.env = { ...env }));
Expand Down

0 comments on commit 8e67e65

Please sign in to comment.