diff --git a/src/controllers/upload.mts b/src/controllers/upload.mts index 17f7df71..817964bd 100644 --- a/src/controllers/upload.mts +++ b/src/controllers/upload.mts @@ -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 { guid: string; diff --git a/test/functional/controllers/upload.test.mts b/test/functional/controllers/upload.test.mts index 9f1e803e..87a00a39 100644 --- a/test/functional/controllers/upload.test.mts +++ b/test/functional/controllers/upload.test.mts @@ -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'); @@ -74,7 +72,7 @@ describe('Upload', () => { app = express(); app.disable('x-powered-by'); - await configureApp(app); + return configureApp(app); }); afterEach(() => (process.env = { ...env }));