use base profile with modifications for each brand
This commit is contained in:
@@ -14,25 +14,31 @@ describe('Cursor Profile Initialization Functionality', () => {
|
||||
cursorProfileContent = fs.readFileSync(cursorJsPath, 'utf8');
|
||||
});
|
||||
|
||||
test('cursor.js exports correct profileName and rulesDir', () => {
|
||||
expect(cursorProfileContent).toContain("const profileName = 'Cursor'");
|
||||
expect(cursorProfileContent).toContain("const rulesDir = '.cursor/rules'");
|
||||
test('cursor.js uses factory pattern with correct configuration', () => {
|
||||
expect(cursorProfileContent).toContain("name: 'cursor'");
|
||||
expect(cursorProfileContent).toContain("displayName: 'Cursor'");
|
||||
expect(cursorProfileContent).toContain("rulesDir: '.cursor/rules'");
|
||||
expect(cursorProfileContent).toContain("profileDir: '.cursor'");
|
||||
});
|
||||
|
||||
test('cursor.js preserves .mdc filenames in fileMap', () => {
|
||||
expect(cursorProfileContent).toContain('fileMap = {');
|
||||
// Should NOT contain any .md mapping
|
||||
expect(cursorProfileContent).not.toMatch(/\.md'/);
|
||||
test('cursor.js preserves .mdc extension in both input and output', () => {
|
||||
expect(cursorProfileContent).toContain("fileExtension: '.mdc'");
|
||||
expect(cursorProfileContent).toContain("targetExtension: '.mdc'");
|
||||
// Should preserve cursor_rules.mdc filename
|
||||
expect(cursorProfileContent).toContain(
|
||||
"'cursor_rules.mdc': 'cursor_rules.mdc'"
|
||||
);
|
||||
});
|
||||
|
||||
test('cursor.js contains tool naming logic and global replacements', () => {
|
||||
expect(cursorProfileContent).toContain('edit_file');
|
||||
expect(cursorProfileContent).toContain('search tool');
|
||||
test('cursor.js uses standard tool mappings (no tool renaming)', () => {
|
||||
expect(cursorProfileContent).toContain('COMMON_TOOL_MAPPINGS.STANDARD');
|
||||
// Should not contain custom tool mappings since cursor keeps original names
|
||||
expect(cursorProfileContent).not.toContain('edit_file');
|
||||
expect(cursorProfileContent).not.toContain('apply_diff');
|
||||
expect(cursorProfileContent).not.toContain('search_files tool');
|
||||
});
|
||||
|
||||
test('cursor.js contains correct documentation URL logic', () => {
|
||||
expect(cursorProfileContent).toContain('docs.cursor.com');
|
||||
test('cursor.js contains correct URL configuration', () => {
|
||||
expect(cursorProfileContent).toContain("url: 'cursor.so'");
|
||||
expect(cursorProfileContent).toContain("docsUrl: 'docs.cursor.com'");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user