...

Source file src/github.com/cli/go-gh/v2/pkg/markdown/markdown_test.go

Documentation: github.com/cli/go-gh/v2/pkg/markdown

     1  package markdown
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/stretchr/testify/assert"
     7  )
     8  
     9  func Test_Render(t *testing.T) {
    10  	t.Setenv("GLAMOUR_STYLE", "")
    11  	tests := []struct {
    12  		name  string
    13  		text  string
    14  		theme string
    15  	}{
    16  		{
    17  			name:  "light style",
    18  			text:  "some text",
    19  			theme: "light",
    20  		},
    21  		{
    22  			name:  "dark style",
    23  			text:  "some text",
    24  			theme: "dark",
    25  		},
    26  		{
    27  			name:  "notty style",
    28  			text:  "some text",
    29  			theme: "none",
    30  		},
    31  	}
    32  	for _, tt := range tests {
    33  		t.Run(tt.name, func(t *testing.T) {
    34  			_, err := Render(tt.text, WithTheme(tt.theme))
    35  			assert.NoError(t, err)
    36  		})
    37  	}
    38  }
    39  

View as plain text