Initial commit

This commit is contained in:
2025-07-30 19:12:53 +03:00
commit 74cbe1e469
83 changed files with 12567 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
package internal
import "testing"
func TestFillMissing(t *testing.T) {
a := &ActionYML{}
defs := DefaultValues{
Name: "Default Name",
Description: "Default Desc",
Runs: map[string]any{"using": "node20"},
Branding: Branding{Icon: "zap", Color: "yellow"},
}
FillMissing(a, defs)
if a.Name != "Default Name" || a.Description != "Default Desc" {
t.Error("defaults not filled correctly")
}
if a.Branding == nil || a.Branding.Icon != "zap" {
t.Error("branding default not set")
}
if a.Runs["using"] != "node20" {
t.Error("runs default not set")
}
}