mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-10 08:05:14 +02:00
feat(cli): add Slack community CTA on errors, crashes, setup, and help (#277)
* feat(cli): show Slack CTA on help and unexpected errors * feat(cli): show Slack CTA after crashes * feat(setup): show Slack community note after setup * chore: refresh Python lockfile versions
This commit is contained in:
parent
6b2f7c3365
commit
66517fc320
14 changed files with 350 additions and 29 deletions
|
|
@ -54,6 +54,32 @@ describe('buildKtxProgram', () => {
|
|||
|
||||
expect(wrote).toBe('');
|
||||
});
|
||||
|
||||
it('adds the Slack community footer to root help', () => {
|
||||
let stdout = '';
|
||||
const io: KtxCliIo = {
|
||||
stdout: {
|
||||
isTTY: false,
|
||||
columns: 80,
|
||||
write: (chunk) => {
|
||||
stdout += chunk;
|
||||
},
|
||||
},
|
||||
stderr: {
|
||||
write: () => undefined,
|
||||
},
|
||||
};
|
||||
const program: Command = buildKtxProgram({
|
||||
io,
|
||||
deps: {},
|
||||
packageInfo: stubPackageInfo(),
|
||||
runInit: async () => 0,
|
||||
});
|
||||
|
||||
program.outputHelp();
|
||||
|
||||
expect(stdout).toContain('Community & support: https://ktx.sh/slack');
|
||||
});
|
||||
});
|
||||
|
||||
describe('collectCommandFlagsPresent', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue