Add configuration
This commit is contained in:
20
theme_test.go
Normal file
20
theme_test.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package main
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestApplyThemeChangesAllRenderingThemes(t *testing.T) {
|
||||
defer func() {
|
||||
if err := applyTheme("dark"); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}()
|
||||
if err := applyTheme("light"); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if markdownStyleName != "light" || codeHighlightTheme != "github" {
|
||||
t.Fatalf("light theme did not propagate: markdown=%q code=%q", markdownStyleName, codeHighlightTheme)
|
||||
}
|
||||
if err := applyTheme("unknown"); err == nil {
|
||||
t.Fatal("unknown theme was accepted")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user