Skip to content

Commit

Permalink
website: update test
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Oct 8, 2024
1 parent 2a1f5eb commit 9bb7360
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/.testRun.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export { testRun }

import { page, test, expect, run, fetchHtml, getServerUrl } from '@brillout/test-e2e'
import { page, test, expect, run, fetchHtml, getServerUrl, partRegex } from '@brillout/test-e2e'

const textDOM = 'Next GenerationFrontend Framework'
const textHTML = '<h1>Next Generation<br/>Frontend Framework</h1>'
const textHTML = partRegex`<h1 ${/[^\>]+/}>Next Generation<br/>Frontend Framework</h1>`

function testRun(cmd: 'pnpm run dev' | 'pnpm run preview') {
{
Expand All @@ -15,7 +15,7 @@ function testRun(cmd: 'pnpm run dev' | 'pnpm run preview') {

test('HTML', async () => {
const html = await fetchHtml('/')
expect(html).toContain(textHTML)
expect(html).toMatch(textHTML)
})

test('DOM', async () => {
Expand Down

0 comments on commit 9bb7360

Please sign in to comment.