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 { RULE_PROFILES } from '../../../src/constants/profiles.js';
import { getRulesProfile } from '../../src/utils/rule-transformer.js'; import { getRulesProfile } from '../../../src/utils/rule-transformer.js';
import path from 'path'; import path from 'path';
describe('MCP Configuration Validation', () => { describe('MCP Configuration Validation', () => {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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