package tests import ( "apigo.cloud/git/apigo/gojs" _ "apigo.cloud/git/apigo/plugins/crypto" "os" "path/filepath" "strings" "testing" ) func TestCrypto(t *testing.T) { if files, err := os.ReadDir("crypto_tests"); err == nil { for _, f := range files { if !f.IsDir() && strings.HasSuffix(f.Name(), "_test.js") { testName := f.Name()[0 : len(f.Name())-8] r, err := gojs.RunFile(filepath.Join("crypto_tests", f.Name()), nil) Test(t, testName, r == true && err == nil, err) } } } }