test logging
This commit is contained in:
parent
0df39dbeea
commit
4dda484b50
1 changed files with 3 additions and 1 deletions
|
|
@ -12,6 +12,7 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"cdr.dev/slog/sloggers/slogtest"
|
||||||
tassert "github.com/stretchr/testify/assert"
|
tassert "github.com/stretchr/testify/assert"
|
||||||
|
|
||||||
"oss.terrastruct.com/d2/lib/log"
|
"oss.terrastruct.com/d2/lib/log"
|
||||||
|
|
@ -49,7 +50,8 @@ func TestRegex(t *testing.T) {
|
||||||
|
|
||||||
func TestInlineRemote(t *testing.T) {
|
func TestInlineRemote(t *testing.T) {
|
||||||
imgCache = sync.Map{}
|
imgCache = sync.Map{}
|
||||||
ctx := log.WithTB(context.Background(), t, nil)
|
// we don't want log.Error to cause this test to fail
|
||||||
|
ctx := log.WithTB(context.Background(), t, &slogtest.Options{IgnoreErrors: true})
|
||||||
svgURL := "https://icons.terrastruct.com/essentials/004-picture.svg"
|
svgURL := "https://icons.terrastruct.com/essentials/004-picture.svg"
|
||||||
pngURL := "https://cdn4.iconfinder.com/data/icons/smart-phones-technologies/512/android-phone.png"
|
pngURL := "https://cdn4.iconfinder.com/data/icons/smart-phones-technologies/512/android-phone.png"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue