feat: refactoring project
This commit is contained in:
13
bin/cli.test.js
Normal file
13
bin/cli.test.js
Normal file
@@ -0,0 +1,13 @@
|
||||
const { execSync } = require('child_process');
|
||||
|
||||
describe('React Crafter CLI', () => {
|
||||
test('CLI runs and shows version', () => {
|
||||
const output = execSync('node bin/cli.js --version').toString();
|
||||
expect(output.trim()).toMatch(/\\d+\\.\\d+\\.\\d+/); // Matches a version format
|
||||
});
|
||||
|
||||
test('CLI handles missing arguments', () => {
|
||||
const output = execSync('node bin/cli.js').toString();
|
||||
expect(output).toContain('React Crafter CLI');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user