goldsmith/plugins/document/document_test.go
Alex Yatskov e24e892773 Revert "Change File to interface"
This reverts commit 2f95fdba2dc53d7281d3a78dc5f5469a62c26680.
2024-03-03 18:09:21 -08:00

26 lines
454 B
Go

package document
import (
"testing"
"git.foosoft.net/alex/goldsmith"
"git.foosoft.net/alex/goldsmith/harness"
"github.com/PuerkitoBio/goquery"
)
func process(file *goldsmith.File, doc *goquery.Document) error {
doc.Find("h1").SetAttr("style", "color: red;")
return nil
}
func Test(self *testing.T) {
type Processor func(*goquery.Document) error
harness.Validate(
self,
func(gs *goldsmith.Goldsmith) {
gs.Chain(New(process))
},
)
}