test: refactor test:demo script into demo/*/test.sh

This commit is contained in:
Yang Jun
2024-08-29 01:30:25 +08:00
committed by Jun Yang
parent da516a4fd6
commit 62bb20e433
48 changed files with 3018 additions and 23043 deletions
+9
View File
@@ -0,0 +1,9 @@
import { expect, test } from 'vitest'
import { render, screen } from '@testing-library/react'
import { App } from './App';
test('App rendered correctly', async () => {
render(<App/>)
const h2 = await screen.findByTestId('heading')
expect(h2.textContent).toEqual('Welcome to Liquid')
})