test: proper sanity check; exclude WasmTest from coverage (#8)

This commit is contained in:
鲁树人
2023-05-18 00:30:39 +01:00
parent 0b7b72c8ef
commit fd410302e4
3 changed files with 16 additions and 5 deletions

View File

@@ -1,6 +1,10 @@
import { render, screen } from '@testing-library/react';
import App from '~/App';
import { renderWithProviders, screen } from '~/test-utils/test-helper';
test('hello', () => {
render(<div>hello</div>);
expect(screen.getByText('hello')).toBeInTheDocument();
test('should be able to render App', () => {
renderWithProviders(<App />);
// Quick sanity check of known strings.
expect(screen.getByText(/仅在浏览器内对文件进行解锁/i)).toBeInTheDocument();
expect(screen.getByText(/UnlockMusic 团队/i)).toBeInTheDocument();
});