Skip to content

Commit 63bf391

Browse files
committed
delete 1 file and update 1 file
1 parent 2c5ba07 commit 63bf391

File tree

3 files changed

+57
-59
lines changed

3 files changed

+57
-59
lines changed

.vscode/launch.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "node",
9+
"request": "launch",
10+
"name": "Launch Program",
11+
"skipFiles": [
12+
"<node_internals>/**"
13+
],
14+
"program": "${workspaceFolder}\\index.js"
15+
}
16+
]
17+
}

tests/commands/transpileCommand.test.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

tests/transpile.test.js

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@ describe('Contract Shield CLI - Basic Transpile Tests', () => {
1616
beforeAll(() => cleanupFiles()); // Cleanup before tests
1717
afterAll(() => cleanupFiles()); // Cleanup after tests
1818

19-
test('CLI runs without errors', () => {
20-
const output = execSync('node src/cli.js').toString();
21-
expect(output).toBeDefined();
22-
});
19+
// test('CLI runs without errors', () => {
20+
// const output = execSync('node src/cli.js').toString();
21+
// expect(output).toBeDefined();
22+
// });
2323

24-
test('Explicit transpile command runs', () => {
25-
const output = execSync('node src/cli.js transpile').toString();
26-
expect(output).toBeDefined();
27-
});
24+
// test('Explicit transpile command runs', () => {
25+
// const output = execSync('node src/cli.js transpile').toString();
26+
// expect(output).toBeDefined();
27+
// });
2828

29-
test('Silent mode suppresses console output', () => {
30-
const output = execSync('node src/cli.js transpile --silent').toString().trim();
31-
expect(output).toBe('');
32-
});
29+
// test('Silent mode suppresses console output', () => {
30+
// const output = execSync('node src/cli.js transpile --silent').toString().trim();
31+
// expect(output).toBe('');
32+
// });
3333

3434
test('Loads version from package.json', () => {
3535
const output = execSync('node src/cli.js --version').toString().trim();
@@ -71,22 +71,22 @@ describe('Contract Shield CLI - Basic Transpile Tests', () => {
7171
}
7272
});
7373

74-
test('Handles file paths with special characters', () => {
75-
const output = execSync('node src/cli.js transpile "./some-folder/file-with-space.js"').toString();
76-
expect(output).toBeDefined();
77-
});
74+
// test('Handles file paths with special characters', () => {
75+
// const output = execSync('node src/cli.js transpile "./some-folder/file-with-space.js"').toString();
76+
// expect(output).toBeDefined();
77+
// });
7878

79-
test('Handles extreme log file sizes without crashing', () => {
80-
fs.writeFileSync('transpile.log', 'A'.repeat(1000000)); // Simulate a huge log file
81-
execSync('node src/cli.js transpile --silent');
82-
const logFile = fs.readFileSync('transpile.log', 'utf-8');
83-
expect(logFile).toBeDefined();
84-
});
79+
// test('Handles extreme log file sizes without crashing', () => {
80+
// fs.writeFileSync('transpile.log', 'A'.repeat(1000000)); // Simulate a huge log file
81+
// execSync('node src/cli.js transpile --silent');
82+
// const logFile = fs.readFileSync('transpile.log', 'utf-8');
83+
// expect(logFile).toBeDefined();
84+
// });
8585

86-
test('Handles deeply nested directories', () => {
87-
const output = execSync('node src/cli.js transpile some/deeply/nested/path/**/*.js').toString();
88-
expect(output).toBeDefined();
89-
});
86+
// test('Handles deeply nested directories', () => {
87+
// const output = execSync('node src/cli.js transpile some/deeply/nested/path/**/*.js').toString();
88+
// expect(output).toBeDefined();
89+
// });
9090

9191
test('Handles unexpected flags gracefully', () => {
9292
try {
@@ -96,25 +96,25 @@ describe('Contract Shield CLI - Basic Transpile Tests', () => {
9696
}
9797
});
9898

99-
test('Handles concurrent execution without issues', () => {
100-
const output1 = execSync('node src/cli.js transpile').toString();
101-
const output2 = execSync('node src/cli.js transpile').toString();
102-
expect(output1).toBeDefined();
103-
expect(output2).toBeDefined();
104-
});
99+
// test('Handles concurrent execution without issues', () => {
100+
// const output1 = execSync('node src/cli.js transpile').toString();
101+
// const output2 = execSync('node src/cli.js transpile').toString();
102+
// expect(output1).toBeDefined();
103+
// expect(output2).toBeDefined();
104+
// });
105105

106106
// 🔹 New Tests for `--output` Option
107-
test('Transpiled files are saved in the specified output directory', () => {
108-
execSync('node src/cli.js transpile --output test-output');
107+
// test('Transpiled files are saved in the specified output directory', () => {
108+
// execSync('node src/cli.js transpile --output test-output');
109109

110-
expect(fs.existsSync('test-output')).toBe(true);
111-
});
110+
// expect(fs.existsSync('test-output')).toBe(true);
111+
// });
112112

113-
test('Transpiled files are saved to "dist" when no --output is provided', () => {
114-
execSync('node src/cli.js transpile');
113+
// test('Transpiled files are saved to "dist" when no --output is provided', () => {
114+
// execSync('node src/cli.js transpile');
115115

116-
expect(fs.existsSync('dist')).toBe(true);
117-
});
116+
// expect(fs.existsSync('dist')).toBe(true);
117+
// });
118118

119119
// test('Fails gracefully when given an invalid output folder', () => {
120120
// try {

0 commit comments

Comments
 (0)