Move everything back to root dir

This commit is contained in:
Joakim Hellsén 2024-02-14 04:40:48 +01:00
commit 1fa8351d11
19 changed files with 257 additions and 300 deletions

27
html_test.go Normal file
View file

@ -0,0 +1,27 @@
package main
import (
"strings"
"testing"
)
// Displays error messages if there are any parse errors
func TestErrorMessages(t *testing.T) {
// Initialize test data
parseResult := []ParseResult{
{IsError: true, Msg: "Error 1"},
{IsError: true, Msg: "Error 2"},
}
h := HTMLData{
ParseResult: parseResult,
}
// Invoke function under test
result := FullHTML(h)
// Assert that the result contains the error messages
if !strings.Contains(result, "Error 1") || !strings.Contains(result, "Error 2") {
t.Errorf("Expected error messages, but got: %s", result)
}
}