File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -496,6 +496,31 @@ test(
496496 } ,
497497) ;
498498
499+ test (
500+ "token without a username" ,
501+ testPATWarning ,
502+ [
503+ {
504+ type : "git_server" ,
505+ host : "https://github.com/" ,
506+ token : `ghp_${ makeTestToken ( ) } ` ,
507+ } ,
508+ ] ,
509+ ( t , results ) => {
510+ // The configurations should be accepted, despite the likely problem.
511+ t . assert ( results ) ;
512+ t . is ( results . length , 1 ) ;
513+ t . is ( results [ 0 ] . type , "git_server" ) ;
514+ t . is ( results [ 0 ] . host , "https://github.com/" ) ;
515+
516+ if ( startProxyExports . isToken ( results [ 0 ] ) ) {
517+ t . assert ( results [ 0 ] . token ?. startsWith ( "ghp_" ) ) ;
518+ } else {
519+ t . fail ( "Expected a `Token`-based credential." ) ;
520+ }
521+ } ,
522+ ) ;
523+
499524test ( "getCredentials returns all credentials for Actions when using LANGUAGE_TO_REGISTRY_TYPE" , async ( t ) => {
500525 const credentialsInput = toEncodedJSON ( mixedCredentials ) ;
501526
You can’t perform that action at this time.
0 commit comments