File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed
Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -36,17 +36,22 @@ test("getArtifactSuffix", (t) => {
3636
3737 // Suffixes for non-empty, valid `matrix` inputs.
3838 const testMatrices = [
39- { language : "go" } ,
40- { language : "javascript" , "build-mode" : "none" } ,
39+ { matrix : { language : "go" } , expected : "-go" } ,
40+ {
41+ matrix : { language : "javascript" , "build-mode" : "none" } ,
42+ expected : "-none-javascript" ,
43+ } ,
44+ {
45+ matrix : { "build-mode" : "none" , language : "javascript" } ,
46+ expected : "-none-javascript" ,
47+ } ,
4148 ] ;
4249
4350 for ( const testMatrix of testMatrices ) {
44- const suffix = debugArtifacts . getArtifactSuffix ( JSON . stringify ( testMatrix ) ) ;
45- t . not ( suffix , "" ) ;
46-
47- for ( const key of Object . keys ( testMatrix ) ) {
48- t . assert ( suffix . includes ( testMatrix [ key ] as string ) ) ;
49- }
51+ const suffix = debugArtifacts . getArtifactSuffix (
52+ JSON . stringify ( testMatrix . matrix ) ,
53+ ) ;
54+ t . is ( suffix , testMatrix . expected ) ;
5055 }
5156} ) ;
5257
You can’t perform that action at this time.
0 commit comments