Skip to content

Commit

Permalink
feature: add markdown javascript test (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
levivilet authored Sep 21, 2024
1 parent 71797c9 commit d2cd946
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
export const name = 'markdown-preview'

export const test = async ({ FileSystem, Main, Locator, expect }) => {
// arrange
const tmpDir = await FileSystem.getTmpDir()
await FileSystem.writeFile(
`${tmpDir}/test.md`,
`## test markdown
<script>
console.log("hello world")
</script>
`,
)

// act
await Main.openUri(`${tmpDir}/test.md`)

// assert
const webView = Locator('.WebView')
await expect(webView).toBeVisible()
}

0 comments on commit d2cd946

Please sign in to comment.