mirror of
https://github.com/tnypxl/rollup.git
synced 2025-12-13 06:23:18 +00:00
fix: resolve build errors in test files
This commit is contained in:
@@ -108,19 +108,20 @@ func TestRunRollup(t *testing.T) {
|
||||
path = tempDir
|
||||
|
||||
// Run the rollup
|
||||
outputFile, err := runRollup()
|
||||
err = runRollup()
|
||||
if err != nil {
|
||||
t.Fatalf("runRollup() failed: %v", err)
|
||||
}
|
||||
|
||||
// Check if the output file was created
|
||||
outputFile := filepath.Join(tempDir, "rollup.md")
|
||||
if _, err := os.Stat(outputFile); os.IsNotExist(err) {
|
||||
files, _ := filepath.Glob(filepath.Join(tempDir, "*"))
|
||||
t.Fatalf("Output file %s not found. Files in directory: %v", outputFile, files)
|
||||
}
|
||||
|
||||
// Read the content of the output file
|
||||
content, err := os.ReadFile(outputFiles[0])
|
||||
content, err := os.ReadFile(outputFile)
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to read output file: %v", err)
|
||||
}
|
||||
|
||||
@@ -6,6 +6,8 @@ import (
|
||||
"net/http/httptest"
|
||||
"strings"
|
||||
"reflect"
|
||||
"log"
|
||||
"io/ioutil"
|
||||
)
|
||||
|
||||
func TestIsAllowedURL(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user