import Testing @testable import gitbay struct MarkupPreviewFormatTests { @Test func orgFilesRenderAsOrg() { #expect(MarkupPreview.format(forFile: "README.org") == "org") #expect(MarkupPreview.format(forFile: "profile/README.org") == "org") } @Test func markdownFilesRenderAsMarkdown() { #expect(MarkupPreview.format(forFile: "README.md") == "md") #expect(MarkupPreview.format(forFile: "notes.markdown") == "md") #expect(MarkupPreview.format(forFile: "CHANGES.MD") == "md") } /// Source files show as source, so there is nothing to preview. @Test func otherFilesHaveNoPreview() { #expect(MarkupPreview.format(forFile: "main.swift") == nil) #expect(MarkupPreview.format(forFile: "Makefile") == nil) #expect(MarkupPreview.format(forFile: "notes.txt") == nil) } }