Files
mmaschedule/scraper/one_test.go
T
2024-07-02 08:04:21 -05:00

27 lines
447 B
Go

package scraper
import (
_ "embed"
"testing"
)
//go:embed testdata/one-fight-night-23.html
var ONEEventHTML []byte
//go:embed testdata/one-events.html
var ONEEventListHTML []byte
func TestONEEventList(t *testing.T) {
PrintJSON(ParseONEEventList(ONEEventListHTML))
}
func TestONEEvent(t *testing.T) {
PrintJSON(ParseONEEvent("some_url", ONEEventHTML))
}
func testScrapeONE(t *testing.T) {
ScrapeONE(func(e *Event) {
PrintJSON(e)
})
}