mirror of
https://github.com/eyaltoledano/claude-task-master.git
synced 2026-01-30 06:12:05 +00:00
feat: improve tm auto-update display (#1444)
This commit is contained in:
@@ -91,12 +91,16 @@ jest.mock('../../scripts/modules/utils.js', () => ({
|
||||
// Import all modules after mocking
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { compareVersions } from '@tm/cli';
|
||||
import {
|
||||
displayUpgradeNotification,
|
||||
parseChangelogHighlights
|
||||
} from '../../apps/cli/src/utils/auto-update/index.js';
|
||||
import { setupCLI } from '../../scripts/modules/commands.js';
|
||||
import {
|
||||
RULES_SETUP_ACTION,
|
||||
RULES_ACTIONS
|
||||
RULES_ACTIONS,
|
||||
RULES_SETUP_ACTION
|
||||
} from '../../src/constants/rules-actions.js';
|
||||
import { compareVersions } from '@tm/cli';
|
||||
|
||||
describe('Commands Module - CLI Setup and Integration', () => {
|
||||
const mockExistsSync = jest.spyOn(fs, 'existsSync');
|
||||
@@ -278,17 +282,8 @@ describe('Version comparison utility', () => {
|
||||
});
|
||||
|
||||
describe('Update check functionality', () => {
|
||||
let displayUpgradeNotification;
|
||||
let parseChangelogHighlights;
|
||||
let consoleLogSpy;
|
||||
|
||||
beforeAll(async () => {
|
||||
// Import from @tm/cli instead of commands.js
|
||||
const cliModule = await import('../../apps/cli/src/utils/auto-update.js');
|
||||
displayUpgradeNotification = cliModule.displayUpgradeNotification;
|
||||
parseChangelogHighlights = cliModule.parseChangelogHighlights;
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
consoleLogSpy = jest.spyOn(console, 'log').mockImplementation(() => {});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user