goldsmith/plugins/document/document_test.go
2024-02-16 22:35:49 -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))
},
)
}