mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
feat(core): Upgrade oclif (no-changelog) (#8381)
This commit is contained in:
committed by
GitHub
parent
2c146cca62
commit
913c8c6b0c
@@ -1,4 +1,4 @@
|
||||
import * as Config from '@oclif/config';
|
||||
import { Config } from '@oclif/core';
|
||||
|
||||
import { InternalHooks } from '@/InternalHooks';
|
||||
import { ImportCredentialsCommand } from '@/commands/import/credentials';
|
||||
@@ -8,6 +8,8 @@ import { mockInstance } from '../../shared/mocking';
|
||||
import * as testDb from '../shared/testDb';
|
||||
import { getAllCredentials } from '../shared/db/credentials';
|
||||
|
||||
const oclifConfig = new Config({ root: __dirname });
|
||||
|
||||
beforeAll(async () => {
|
||||
mockInstance(InternalHooks);
|
||||
mockInstance(LoadNodesAndCredentials);
|
||||
@@ -23,12 +25,11 @@ afterAll(async () => {
|
||||
});
|
||||
|
||||
test('import:credentials should import a credential', async () => {
|
||||
const config: Config.IConfig = new Config.Config({ root: __dirname });
|
||||
const before = await getAllCredentials();
|
||||
expect(before.length).toBe(0);
|
||||
const importer = new ImportCredentialsCommand(
|
||||
['--input=./test/integration/commands/importCredentials/credentials.json'],
|
||||
config,
|
||||
oclifConfig,
|
||||
);
|
||||
const mockExit = jest.spyOn(process, 'exit').mockImplementation(() => {
|
||||
throw new Error('process.exit');
|
||||
|
||||
Reference in New Issue
Block a user