-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chore: Fix the no config error for hs --version (#1314)
- Loading branch information
1 parent
31b9051
commit 34f0327
Showing
2 changed files
with
52 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { describe, beforeAll, it, expect, afterAll } from 'vitest'; | ||
import { TestState } from '../../lib/TestState'; | ||
|
||
describe('hs', () => { | ||
let testState: TestState; | ||
|
||
beforeAll(async () => { | ||
testState = new TestState(); | ||
}); | ||
|
||
afterAll(() => { | ||
testState.cleanup(); | ||
}); | ||
|
||
describe('hs', () => { | ||
it('should log out the help message', async () => { | ||
const output = await testState.cli.executeWithTestConfig([]); | ||
|
||
expect(output).toContain( | ||
'The command line interface to interact with HubSpot' | ||
); | ||
}); | ||
|
||
it('should log out the help message when --help is passed', async () => { | ||
const output = await testState.cli.executeWithTestConfig(['--help']); | ||
|
||
expect(output).toContain( | ||
'The command line interface to interact with HubSpot' | ||
); | ||
}); | ||
|
||
it('should not throw when --version is passed', async () => { | ||
await testState.cli.executeWithTestConfig(['--version']); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters