mirror of
https://github.com/yamadashy/repomix.git
synced 2026-02-03 11:33:39 +01:00
- Remove unused imports across 67 files (RepomixConfigMerged, QueryCapture, etc.) - Fix unused parameters by prefixing with underscore (_context, _index, etc.) - Remove unused catch parameters using modern JavaScript syntax - Fix require-yield warnings in generator functions - Remove unused variables and interface declarations - Add oxlint configuration to ignore integration test fixtures Resolves 144 linting warnings while preserving all functionality. All 743 tests continue to pass. Code quality significantly improved.
41 lines
1.1 KiB
TypeScript
41 lines
1.1 KiB
TypeScript
import { describe, expect, test } from 'vitest';
|
|
import { parseFile } from '../../../src/core/treeSitter/parseFile.js';
|
|
import { createMockConfig } from '../../../tests/testing/testUtils.js';
|
|
|
|
describe('parseFile for Java', () => {
|
|
test('should parse Java correctly', async () => {
|
|
const fileContent = `
|
|
/**
|
|
* A simple Hello World class
|
|
*/
|
|
public class HelloWorld {
|
|
/**
|
|
* Main entry point
|
|
* @param args command line arguments
|
|
*/
|
|
public static void main(String[] args) {
|
|
System.out.println("Hello, world!");
|
|
}
|
|
}
|
|
`;
|
|
const filePath = 'dummy.java';
|
|
const config = {};
|
|
const result = await parseFile(fileContent, filePath, createMockConfig(config));
|
|
expect(typeof result).toBe('string');
|
|
|
|
const expectContents = [
|
|
'/**',
|
|
'* A simple Hello World class',
|
|
'*/',
|
|
'public class HelloWorld {',
|
|
'* Main entry point',
|
|
'* @param args command line arguments',
|
|
'public static void main(String[] args) {',
|
|
];
|
|
|
|
for (const expectContent of expectContents) {
|
|
expect(result).toContain(expectContent);
|
|
}
|
|
});
|
|
});
|