feat: initial commit

This commit is contained in:
Carlos
2024-08-12 22:57:35 -04:00
commit 6f68ae8259
13140 changed files with 1104801 additions and 0 deletions

19
tests/index.text.js Normal file
View File

@@ -0,0 +1,19 @@
// tests/index.test.js
const { printCommandSummary } = require('../index');
const chalk = require('chalk');
describe('printCommandSummary', () => {
it('should print the command summary without errors', () => {
// Mock console.log to capture output
const logSpy = jest.spyOn(console, 'log').mockImplementation(() => {});
printCommandSummary();
// Check that console.log was called
expect(logSpy).toHaveBeenCalled();
// Restore console.log
logSpy.mockRestore();
});
});

View File

@@ -0,0 +1,18 @@
// tests/index.test.js
const { installDependencies } = require('../index');
const child_process = require('child_process');
jest.mock('child_process');
describe('installDependencies', () => {
it('should install dependencies without errors', () => {
const execSyncMock = jest.spyOn(child_process, 'execSync').mockImplementation(() => {});
installDependencies();
expect(execSyncMock).toHaveBeenCalledWith(expect.stringContaining('npm install'), expect.anything());
execSyncMock.mockRestore();
});
});