Skip to content

Commit

Permalink
chore: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
gao-sun committed Dec 10, 2022
1 parent 72b2f2a commit 6f59c0a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/middleware/koa-spa-proxy.test.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import envSet, { MountedApps } from '#src/env-set/index.js';
import { mockEsmDefault, mockEsmWithActual, pickDefault } from '#src/test-utils/mock.js';
import { mockEsmDefault, pickDefault } from '#src/test-utils/mock.js';
import { createContextWithRouteParameters } from '#src/utils/test-utils.js';

const { jest } = import.meta;

const mockProxyMiddleware = jest.fn();
const mockStaticMiddleware = jest.fn();

await mockEsmWithActual('fs/promises', () => ({
mockEsmDefault('fs/promises', () => ({
readdir: jest.fn().mockResolvedValue(['sign-in']),
}));

Expand Down
1 change: 0 additions & 1 deletion packages/core/src/test-utils/mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export const mockEsmWithActual: <T>(
...factory(),
}));

// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return import(moduleName);
};

Expand Down

0 comments on commit 6f59c0a

Please sign in to comment.