Skip to content

Commit

Permalink
Reproduce runtime error
Browse files Browse the repository at this point in the history
  • Loading branch information
Rindrics committed Jun 17, 2024
1 parent fdff859 commit 8a4c8e4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
node-version-file: '.node-version'
cache: 'pnpm'

- name: Install dependencies
run: make install
- name: Install dependencies & build application
run: make

- name: Lint & format
run: make lint
Expand Down
14 changes: 14 additions & 0 deletions src/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { exec } from 'child_process';
import path from 'path';

describe('CLI', () => {
it('should display help message without errors', (done) => {
const indexPath = path.resolve(__dirname, '../dist/index.js');
exec(`node ${indexPath} --help`, (error, stdout, stderr) => {
expect(error).toBeNull();
expect(stderr).toBe('');
expect(stdout).toContain('Usage: aws-cost');
done();
});
});
});

0 comments on commit 8a4c8e4

Please sign in to comment.