organize tests into profiles folder
This commit is contained in:
@@ -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', () => {
|
||||
@@ -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';
|
||||
@@ -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 });
|
||||
}
|
||||
@@ -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);
|
||||
@@ -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);
|
||||
@@ -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 });
|
||||
}
|
||||
@@ -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);
|
||||
@@ -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', () => {
|
||||
@@ -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)
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user