File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed
Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ program
4545 const spinner = ora ( "Uploading screenshots" ) . start ( ) ;
4646 try {
4747 const result = await upload ( {
48+ token : options . token ,
4849 root : directory ,
4950 buildName : options . buildName ,
5051 files : options . files ,
Original file line number Diff line number Diff line change @@ -27,4 +27,15 @@ describe("#createConfig", () => {
2727 it ( "throws with invalid commit" , ( ) => {
2828 expect ( ( ) => createConfig ( ) . validate ( ) ) . toThrow ( "commit: Invalid commit" ) ;
2929 } ) ;
30+
31+ it ( "throws with invalid token" , ( ) => {
32+ const config = createConfig ( ) ;
33+ config . load ( {
34+ commit : "f16f980bd17cccfa93a1ae7766727e67950773d0" ,
35+ token : "invalid" ,
36+ } ) ;
37+ expect ( ( ) => config . validate ( ) ) . toThrow (
38+ "token: Invalid Argos repository token (must be 40 characters)" ,
39+ ) ;
40+ } ) ;
3041} ) ;
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ const mustBeCommit = (value: any) => {
2323
2424const mustBeArgosToken = ( value : any ) => {
2525 if ( value && value . length !== 40 ) {
26- throw new Error ( "Must be a valid Argos repository token" ) ;
26+ throw new Error ( "Invalid Argos repository token (must be 40 characters) " ) ;
2727 }
2828} ;
2929
You can’t perform that action at this time.
0 commit comments