@dharshansr/gitgenius
Version:
AI-powered commit message generator with enhanced features
31 lines • 1.35 kB
JavaScript
import { describe, test, expect } from '@jest/globals';
describe('GitGenius Core', () => {
test('should have correct package configuration', () => {
const packageJson = require('../../package.json');
expect(packageJson.version).toMatch(/^\d+\.\d+\.\d+$/); // Semantic version format
expect(packageJson.name).toBe('@dharshansr/gitgenius');
});
test('should have required dependencies', () => {
const packageJson = require('../../package.json');
const requiredDeps = ['commander', 'inquirer', 'chalk', 'simple-git', 'axios'];
requiredDeps.forEach(dep => {
expect(packageJson.dependencies).toHaveProperty(dep);
});
});
test('should have correct main entry point', () => {
const packageJson = require('../../package.json');
expect(packageJson.main).toBe('dist/index.js');
expect(packageJson.bin).toHaveProperty('gitgenius');
expect(packageJson.bin).toHaveProperty('gg');
});
test('should support dry-run option in CommitOptions interface', () => {
const commitOptions = {
dryRun: true,
type: 'feat',
apply: false
};
expect(commitOptions.dryRun).toBe(true);
expect(typeof commitOptions.dryRun).toBe('boolean');
});
});
//# sourceMappingURL=index.test.js.map