mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
18 lines
650 B
TypeScript
18 lines
650 B
TypeScript
import { License } from '@/License';
|
|
import { LoadNodesAndCredentials } from '@/LoadNodesAndCredentials';
|
|
import { ClearLicenseCommand } from '@/commands/license/clear';
|
|
|
|
import { setupTestCommand } from '@test-integration/utils/testCommand';
|
|
import { mockInstance } from '../../shared/mocking';
|
|
|
|
mockInstance(LoadNodesAndCredentials);
|
|
const license = mockInstance(License);
|
|
const command = setupTestCommand(ClearLicenseCommand);
|
|
|
|
test('license:clear invokes shutdown() to release any floating entitlements', async () => {
|
|
await command.run();
|
|
|
|
expect(license.init).toHaveBeenCalledTimes(1);
|
|
expect(license.shutdown).toHaveBeenCalledTimes(1);
|
|
});
|