diff --git a/src/App.tsx b/src/App.tsx
index 20bad54..93aed70 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -15,7 +15,7 @@ function App() {
- {localStorage.__dev_test === '1' && }
+
diff --git a/src/WasmTest.tsx b/src/WasmTest.tsx
index eb987b6..679a189 100644
--- a/src/WasmTest.tsx
+++ b/src/WasmTest.tsx
@@ -1,5 +1,6 @@
import { loadLibParakeet, BlobSink, createArrayBufferReader } from '@jixun/libparakeet';
+/* c8 ignore start: test only code */
function testWasm() {
loadLibParakeet().then(async (mod) => {
const data = new Uint8Array(0x2000);
@@ -23,9 +24,15 @@ function testWasm() {
}
export function WasmTest() {
+ // Some secret test flags...
+ if (localStorage.__dev_test !== '1') {
+ return null;
+ }
+
return (
);
}
+/* c8 ignore stop: test only code */
diff --git a/src/__tests__/sanity-check.test.tsx b/src/__tests__/sanity-check.test.tsx
index 443fc8a..42f89f5 100644
--- a/src/__tests__/sanity-check.test.tsx
+++ b/src/__tests__/sanity-check.test.tsx
@@ -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(
hello
);
- expect(screen.getByText('hello')).toBeInTheDocument();
+test('should be able to render App', () => {
+ renderWithProviders();
+
+ // Quick sanity check of known strings.
+ expect(screen.getByText(/仅在浏览器内对文件进行解锁/i)).toBeInTheDocument();
+ expect(screen.getByText(/UnlockMusic 团队/i)).toBeInTheDocument();
});