-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cli): ✨ add
skip when none
hint to breaking change prompt
- Loading branch information
1 parent
30c8c7a
commit 614f502
Showing
12 changed files
with
141 additions
and
35 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
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
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,27 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`lang promptsLang should create prompts lang 1`] = ` | ||
Object { | ||
"body": Object { | ||
"hint": "...supports multi line, press enter to go to next line", | ||
"message": "Add a longer description | ||
", | ||
}, | ||
"breaking": Object { | ||
"hint": "[2m...skip when none[22m", | ||
"message": "[1mAdd any breaking changes[22m | ||
[31mBREAKING CHANGE:[39m", | ||
}, | ||
"scope": Object { | ||
"hint": "[2m...type or use arrow keys[22m", | ||
"message": "Choose the scope", | ||
}, | ||
"subject": Object { | ||
"message": "Add a short description", | ||
}, | ||
"type": Object { | ||
"hint": "[2m...type or use arrow keys[22m", | ||
"message": "Choose the type", | ||
}, | ||
} | ||
`; |
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
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,28 @@ | ||
import { breaking } from './breaking' | ||
import { defaultConfig } from '../defaults' | ||
import { EnquirerPrompt } from '../interfaces' | ||
|
||
describe('breaking', () => { | ||
it('should create body prompt', () => { | ||
const breakingPrompt = breaking({ | ||
config: defaultConfig, | ||
answers: { | ||
body: '', | ||
breaking: '', | ||
issues: '', | ||
scope: '', | ||
subject: '', | ||
type: '', | ||
}, | ||
flags: {}, | ||
}) as Required<EnquirerPrompt> | ||
|
||
expect(breakingPrompt).toStrictEqual({ | ||
hint: '[2m...skip when none[22m', | ||
message: `[1mAdd any breaking changes[22m | ||
[31mBREAKING CHANGE:[39m`, | ||
name: 'breaking', | ||
type: 'text', | ||
}) | ||
}) | ||
}) |
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
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,9 @@ | ||
import { promptsLang } from './lang' | ||
|
||
describe('lang', () => { | ||
describe('promptsLang', () => { | ||
it('should create prompts lang', () => { | ||
expect(promptsLang).toMatchSnapshot() | ||
}) | ||
}) | ||
}) |
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
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
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
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
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