diff --git a/pkg/modules/chromium/routes_test.go b/pkg/modules/chromium/routes_test.go index d351b18d..0a7a440f 100644 --- a/pkg/modules/chromium/routes_test.go +++ b/pkg/modules/chromium/routes_test.go @@ -432,6 +432,29 @@ func TestConvertMarkdownHandler(t *testing.T) { outputDir: "/tmp/foo", expectOutputPathsCount: 1, }, + { + ctx: func() *api.MockContext { + ctx := &api.MockContext{Context: &api.Context{}} + + ctx.SetDirPath("/tmp/foo") + ctx.SetFiles(map[string]string{ + "index.html": "/tests/test/testdata/chromium/markdown/sample3/index.html", + "markdown1.md": "/tests/test/testdata/chromium/markdown/sample3/markdown.md", + }) + + return ctx + }(), + api: func() API { + chromiumAPI := struct{ ProtoAPI }{} + chromiumAPI.pdf = func(_ context.Context, _ *zap.Logger, _, _ string, _ Options) error { + return nil + } + + return chromiumAPI + }(), + outputDir: "/tmp/foo", + expectOutputPathsCount: 1, + }, } { func() { if tc.outputDir != "" { diff --git a/test/testdata/chromium/markdown/sample3/index.html b/test/testdata/chromium/markdown/sample3/index.html new file mode 100644 index 00000000..465f6d06 --- /dev/null +++ b/test/testdata/chromium/markdown/sample3/index.html @@ -0,0 +1,18 @@ + + +
+ +