organize tests into profiles folder

This commit is contained in:
Joe Danziger
2025-05-27 16:37:31 -04:00
parent 8dec6e14e2
commit 83bb4c46e6
14 changed files with 23 additions and 23 deletions

View File

@@ -1,5 +1,5 @@
import { RULE_PROFILES } from '../../src/constants/profiles.js';
import { getRulesProfile } from '../../src/utils/rule-transformer.js';
import { RULE_PROFILES } from '../../../src/constants/profiles.js';
import { getRulesProfile } from '../../../src/utils/rule-transformer.js';
import path from 'path';
describe('MCP Configuration Validation', () => {

View File

@@ -1,8 +1,8 @@
import {
getInstalledProfiles,
wouldRemovalLeaveNoProfiles
} from '../../src/utils/profiles.js';
import { rulesDirect } from '../../mcp-server/src/core/direct-functions/rules.js';
} from '../../../src/utils/profiles.js';
import { rulesDirect } from '../../../mcp-server/src/core/direct-functions/rules.js';
import fs from 'fs';
import path from 'path';
import { jest } from '@jest/globals';

View File

@@ -2,8 +2,8 @@ import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
import { dirname } from 'path';
import { convertRuleToProfileRule } from '../../src/utils/rule-transformer.js';
import { clineProfile } from '../../scripts/profiles/cline.js';
import { convertRuleToProfileRule } from '../../../src/utils/rule-transformer.js';
import { clineProfile } from '../../../scripts/profiles/cline.js';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
@@ -11,8 +11,8 @@ const __dirname = dirname(__filename);
describe('Cline Rule Transformer', () => {
const testDir = path.join(__dirname, 'temp-test-dir');
beforeAll(() => {
// Create test directory
beforeEach(() => {
// Create test directory before each test
if (!fs.existsSync(testDir)) {
fs.mkdirSync(testDir, { recursive: true });
}

View File

@@ -6,8 +6,8 @@ import {
convertAllRulesToProfileRules,
convertRuleToProfileRule,
getRulesProfile
} from '../../src/utils/rule-transformer.js';
import { cursorProfile } from '../../scripts/profiles/cursor.js';
} from '../../../src/utils/rule-transformer.js';
import { cursorProfile } from '../../../scripts/profiles/cursor.js';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

View File

@@ -6,8 +6,8 @@ import {
convertAllRulesToProfileRules,
convertRuleToProfileRule,
getRulesProfile
} from '../../src/utils/rule-transformer.js';
import { rooProfile } from '../../scripts/profiles/roo.js';
} from '../../../src/utils/rule-transformer.js';
import { rooProfile } from '../../../scripts/profiles/roo.js';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

View File

@@ -2,8 +2,8 @@ import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
import { dirname } from 'path';
import { convertRuleToProfileRule } from '../../src/utils/rule-transformer.js';
import { traeProfile } from '../../scripts/profiles/trae.js';
import { convertRuleToProfileRule } from '../../../src/utils/rule-transformer.js';
import { traeProfile } from '../../../scripts/profiles/trae.js';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
@@ -11,8 +11,8 @@ const __dirname = dirname(__filename);
describe('Trae Rule Transformer', () => {
const testDir = path.join(__dirname, 'temp-test-dir');
beforeAll(() => {
// Create test directory
beforeEach(() => {
// Create test directory before each test
if (!fs.existsSync(testDir)) {
fs.mkdirSync(testDir, { recursive: true });
}

View File

@@ -2,8 +2,8 @@ import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
import { dirname } from 'path';
import { convertRuleToProfileRule } from '../../src/utils/rule-transformer.js';
import { windsurfProfile } from '../../scripts/profiles/windsurf.js';
import { convertRuleToProfileRule } from '../../../src/utils/rule-transformer.js';
import { windsurfProfile } from '../../../scripts/profiles/windsurf.js';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

View File

@@ -1,8 +1,8 @@
import {
isValidProfile,
getRulesProfile
} from '../../src/utils/rule-transformer.js';
import { RULE_PROFILES } from '../../src/constants/profiles.js';
} from '../../../src/utils/rule-transformer.js';
import { RULE_PROFILES } from '../../../src/constants/profiles.js';
describe('Rule Transformer - General', () => {
describe('Profile Configuration Validation', () => {

View File

@@ -4,8 +4,8 @@ import { jest } from '@jest/globals';
import {
removeProfileRules,
getRulesProfile
} from '../../src/utils/rule-transformer.js';
import { removeTaskMasterMCPConfiguration } from '../../src/utils/mcp-config-setup.js';
} from '../../../src/utils/rule-transformer.js';
import { removeTaskMasterMCPConfiguration } from '../../../src/utils/mcp-config-setup.js';
// Mock logger
const mockLog = {
@@ -15,7 +15,7 @@ const mockLog = {
};
// Mock the logger import
jest.mock('../../scripts/modules/utils.js', () => ({
jest.mock('../../../scripts/modules/utils.js', () => ({
log: (level, message) => mockLog[level]?.(message)
}));