File tree Expand file tree Collapse file tree 4 files changed +29
-17
lines changed
Expand file tree Collapse file tree 4 files changed +29
-17
lines changed Original file line number Diff line number Diff line change 44
55process . env . MICRO_APP_TEST = 'true' ;
66
7- const path = require ( 'path' ) ;
8-
97describe ( 'Command deploy' , ( ) => {
108
119 it ( 'deploy' , async ( ) => {
1210
1311 const { service } = require ( '@micro-app/cli' ) ;
1412
15- service . registerPlugin ( {
16- id : 'test:DeployCommand' ,
17- link : path . join ( __dirname , './index.js' ) ,
18- } ) ;
19-
2013 const result = await service . run ( 'deploy' ) ;
2114 console . log ( result ) ;
2215 } ) ;
Original file line number Diff line number Diff line change 22
33/* global expect */
44
5- const MicroApp = require ( '@micro-app/core' ) ;
6- const Service = MicroApp . Service ;
7- const path = require ( 'path' ) ;
85
96describe ( 'Plugin DeployCommand' , ( ) => {
107
11- it ( 'DeployCommand' , ( ) => {
12- const service = new Service ( ) ;
13- service . registerPlugin ( {
14- id : 'test:DeployCommand' ,
15- link : path . join ( __dirname , './index.js' ) ,
16- } ) ;
8+ it ( 'release' , async ( ) => {
9+ const { service } = require ( '@micro-app/cli' ) ;
10+ await service . run ( 'help' , { _ : [ 'release' ] } ) ;
11+ } ) ;
1712
18- service . run ( 'help' , { _ : [ ] } ) ;
13+ it ( 'deploy' , async ( ) => {
14+ const { service } = require ( '@micro-app/cli' ) ;
15+ await service . run ( 'help' , { _ : [ 'deploy' ] } ) ;
1916 } ) ;
2017
2118} ) ;
Original file line number Diff line number Diff line change @@ -50,6 +50,11 @@ Examples:
5050
5151 let chain = Promise . resolve ( ) ;
5252
53+ if ( process . env . MICRO_APP_TEST ) {
54+ api . logger . debug ( 'MICRO_APP_TEST --> Exit!!!' ) ;
55+ return chain ;
56+ }
57+
5358 chain = chain . then ( ( ) => api . applyPluginHooks ( 'beforeCommandRelease' , { args } ) ) ;
5459
5560 chain = chain . then ( ( ) => {
Original file line number Diff line number Diff line change 1+ 'use strict' ;
2+
3+ /* global expect */
4+
5+ process . env . MICRO_APP_TEST = 'true' ;
6+
7+ describe ( 'Command release' , ( ) => {
8+
9+ it ( 'release' , async ( ) => {
10+
11+ const { service } = require ( '@micro-app/cli' ) ;
12+
13+ const result = await service . run ( 'release' ) ;
14+ console . log ( result ) ;
15+ } ) ;
16+
17+ } ) ;
You can’t perform that action at this time.
0 commit comments