mirror of
https://github.com/SecurityBrewery/catalyst.git
synced 2025-12-11 01:32:46 +01:00
feat: add reactions (#1074)
This commit is contained in:
42
ui/ui_test.go
Normal file
42
ui/ui_test.go
Normal file
@@ -0,0 +1,42 @@
|
||||
package ui
|
||||
|
||||
import (
|
||||
"io/fs"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestUI(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
wantFiles []string
|
||||
}{
|
||||
{
|
||||
name: "TestUI",
|
||||
wantFiles: []string{
|
||||
"index.html",
|
||||
},
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
got := UI()
|
||||
|
||||
var gotFiles []string
|
||||
|
||||
require.NoError(t, fs.WalkDir(got, ".", func(path string, d fs.DirEntry, _ error) error {
|
||||
if !d.IsDir() {
|
||||
gotFiles = append(gotFiles, path)
|
||||
}
|
||||
|
||||
return nil
|
||||
}))
|
||||
|
||||
for _, wantFile := range tt.wantFiles {
|
||||
assert.Contains(t, gotFiles, wantFile)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user