mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Fix custom hook mocked path in api cli test (#15271)
* fix custom hook mocked path in api cli test * update @types/jest * update to latest * update and pin dependencies * correct pnpm lock * remove unrelated changes
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import path from 'path';
|
||||
import { Command } from 'commander';
|
||||
import { Extension, HookConfig } from '@directus/shared/types';
|
||||
import { createCli } from './index';
|
||||
@@ -19,7 +20,8 @@ jest.mock('@directus/shared/utils/node/get-extensions', () => ({
|
||||
getLocalExtensions: jest.fn(() => Promise.resolve([customCliExtension])),
|
||||
}));
|
||||
|
||||
jest.mock(`/hooks/custom-cli/index.js`, () => customCliHook, { virtual: true });
|
||||
const customHookPath = path.resolve('/hooks/custom-cli', 'index.js');
|
||||
jest.doMock(customHookPath, () => customCliHook, { virtual: true });
|
||||
|
||||
const customCliExtension: Extension = {
|
||||
path: `/hooks/custom-cli`,
|
||||
|
||||
Reference in New Issue
Block a user