Skip to content

Commit f7ca576

Browse files
committed
update 1 file and create 1 file
1 parent 4809647 commit f7ca576

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

src/commands/transpile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,4 @@ function transpileCommand(patterns, options) {
8484
}
8585
}
8686

87-
module.exports = { transpileCommand };
87+
module.exports = { transpileCommand };
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
const fs = require('fs');
2+
const { execSync } = require('child_process');
3+
4+
describe('transpileCommand CLI', () => {
5+
beforeAll(() => {
6+
// Create a test config file before running the tests
7+
fs.writeFileSync('test-config.json', JSON.stringify({ option: true }));
8+
});
9+
10+
afterAll(() => {
11+
// Clean up the test config file after tests are done
12+
fs.unlinkSync('test-config.json');
13+
});
14+
15+
test('CLI runs with a specified config file', () => {
16+
const output = execSync('node src/cli.js transpile --config test-config.json').toString();
17+
expect(output).toBeDefined();
18+
});
19+
});

0 commit comments

Comments
 (0)