feat: project scaffold — Vite + React + TS + test setup
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
import React from 'react'
|
||||
import ReactDOM from 'react-dom/client'
|
||||
|
||||
ReactDOM.createRoot(document.getElementById('root')!).render(
|
||||
<React.StrictMode>
|
||||
<div>MorseQuest loading...</div>
|
||||
</React.StrictMode>
|
||||
)
|
||||
@@ -0,0 +1,28 @@
|
||||
// Mock AudioContext for tests
|
||||
class MockAudioContext {
|
||||
currentTime = 0
|
||||
destination = {}
|
||||
state: AudioContextState = 'running'
|
||||
createOscillator() {
|
||||
return {
|
||||
connect: () => {},
|
||||
start: () => {},
|
||||
stop: () => {},
|
||||
frequency: { value: 0 },
|
||||
type: 'sine' as OscillatorType,
|
||||
}
|
||||
}
|
||||
createGain() {
|
||||
return {
|
||||
connect: () => {},
|
||||
gain: {
|
||||
value: 1,
|
||||
setValueAtTime: () => {},
|
||||
linearRampToValueAtTime: () => {},
|
||||
},
|
||||
}
|
||||
}
|
||||
async resume() {}
|
||||
async suspend() {}
|
||||
}
|
||||
;(global as any).AudioContext = MockAudioContext
|
||||
Reference in New Issue
Block a user