github.com/replit/upm@v0.0.0-20240423230255-9ce4fc3ea24c/test-suite/Info_test.go (about)

     1  package testSuite
     2  
     3  import (
     4  	"testing"
     5  
     6  	testUtils "github.com/replit/upm/test-suite/utils"
     7  )
     8  
     9  func TestInfo(t *testing.T) {
    10  	for _, bt := range languageBackends {
    11  		bt.Start(t)
    12  
    13  		switch bt.Backend.Name {
    14  		case "nodejs-npm":
    15  			fallthrough
    16  		case "nodejs-pnpm":
    17  			fallthrough
    18  		case "nodejs-yarn":
    19  			fallthrough
    20  		case "bun":
    21  			doInfo(bt, "express", "@replit/crosis", "@distube/spotify")
    22  
    23  		case "python3-poetry", "python3-pip":
    24  			doInfo(bt, "Flask", "replit-ai")
    25  
    26  		default:
    27  			t.Run(bt.Backend.Name, func(t *testing.T) {
    28  				t.Skip("no test")
    29  			})
    30  			continue
    31  		}
    32  	}
    33  }
    34  
    35  func doInfo(t testUtils.BackendT, pkgs ...string) {
    36  	t.Subtest(t.Backend.Name, func(t testUtils.BackendT) {
    37  		for _, pkg := range pkgs {
    38  			t.Subtest(pkg, func(t testUtils.BackendT) {
    39  				t.UpmInfo(pkg)
    40  			})
    41  		}
    42  	})
    43  }