mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
test: Make oclif commands testable (#3571)
* ➕ Add `@oclif/core` * 📦 Update `package-lock.json` * 📘 Export `Logger` for use as type * ✨ Create `BaseCommand` * 🐛 Prevent DB re-init * ♻️ Refactor `reset` command * 🧪 Fix `reset` test * 👕 Add lint exception Co-authored-by: Jan Oberhauser <janober@users.noreply.github.com>
This commit is contained in:
@@ -45,6 +45,8 @@ export function linkRepository<Entity>(entityClass: EntityTarget<Entity>): Repos
|
||||
export async function init(
|
||||
testConnectionOptions?: ConnectionOptions,
|
||||
): Promise<IDatabaseCollections> {
|
||||
if (isInitialized) return collections;
|
||||
|
||||
const dbType = (await GenericHelpers.getConfigValue('database.type')) as DatabaseType;
|
||||
const n8nFolder = UserSettings.getUserN8nFolderPath();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user