@@ -30,7 +30,7 @@ describe('Configure environments masking', function () {
3030 sandbox . restore ( ) ;
3131 } ) ;
3232
33- it ( 'configure:environments:get should not print raw client secrets' , function ( ) {
33+ test . do ( ( ) => {
3434 getEnvironmentsStub . resolves ( {
3535 default : 'dev' ,
3636 environments : {
@@ -40,18 +40,18 @@ describe('Configure environments masking', function () {
4040 } ,
4141 } ,
4242 } ) ;
43-
44- return test
45- . stub ( BoxCommand . prototype , 'getEnvironments' , getEnvironmentsStub )
46- . stdout ( )
47- . command ( [ 'configure:environments:get' ] )
48- . it ( 'masks clientSecret in output' , ( ctx ) => {
43+ } )
44+ . stdout ( )
45+ . command ( [ 'configure:environments:get' ] )
46+ . it (
47+ 'configure:environments:get should not print raw client secrets' ,
48+ ( ctx ) => {
4949 assert . notInclude ( ctx . stdout , RAW_SECRET ) ;
5050 assert . include ( ctx . stdout , MASKED_SECRET ) ;
51- } ) ;
52- } ) ;
51+ }
52+ ) ;
5353
54- it ( 'configure:environments:update should not print raw client secrets' , function ( ) {
54+ test . do ( ( ) => {
5555 getEnvironmentsStub . resolves ( {
5656 default : 'dev' ,
5757 environments : {
@@ -61,19 +61,14 @@ describe('Configure environments masking', function () {
6161 } ,
6262 } ,
6363 } ) ;
64-
65- return test
66- . stub ( BoxCommand . prototype , 'getEnvironments' , getEnvironmentsStub )
67- . stub (
68- BoxCommand . prototype ,
69- 'updateEnvironments' ,
70- updateEnvironmentsStub
71- )
72- . stdout ( )
73- . command ( [ 'configure:environments:update' ] )
74- . it ( 'masks clientSecret in output' , ( ctx ) => {
64+ } )
65+ . stdout ( )
66+ . command ( [ 'configure:environments:update' ] )
67+ . it (
68+ 'configure:environments:update should not print raw client secrets' ,
69+ ( ctx ) => {
7570 assert . notInclude ( ctx . stdout , RAW_SECRET ) ;
7671 assert . include ( ctx . stdout , MASKED_SECRET ) ;
77- } ) ;
78- } ) ;
72+ }
73+ ) ;
7974} ) ;
0 commit comments