mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-15 00:54:06 -08:00
18 lines
654 B
TypeScript
18 lines
654 B
TypeScript
import { License } from '@/license';
|
|
import { LoadNodesAndCredentials } from '@/load-nodes-and-credentials';
|
|
import { ClearLicenseCommand } from '@/commands/license/clear';
|
|
|
|
import { setupTestCommand } from '@test-integration/utils/test-command';
|
|
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);
|
|
});
|