File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ type PullOptions = {
1717 conf ?: string
1818 output : string
1919 locales ?: string
20- dryRun ? : boolean
20+ dryRun : boolean
2121}
2222
2323export const command = 'pull'
Original file line number Diff line number Diff line change @@ -31,10 +31,21 @@ afterEach(() => {
3131// ----------
3232// test cases
3333
34- test ( '--provider: not found' , async ( ) => {
35- // setup mocks
34+ test ( 'require option' , async ( ) => {
35+ const push = await import ( '../../src/commands/push' )
36+ const cmd = yargs . command ( push )
37+ try {
38+ await new Promise ( ( resolve , reject ) => {
39+ cmd . parse ( `push` , ( err , argv , output ) => {
40+ err ? reject ( err ) : resolve ( output )
41+ } )
42+ } )
43+ } catch ( e ) {
44+ expect ( e ) . toMatchObject ( { name : 'YError' } )
45+ }
46+ } )
3647
37- // run
48+ test ( '--provider: not found' , async ( ) => {
3849 const push = await import ( '../../src/commands/push' )
3950 const cmd = yargs . command ( push )
4051 await new Promise ( ( resolve , reject ) => {
You can’t perform that action at this time.
0 commit comments