Initial commit: Text Adventure Game
Features: - Combat system with AP/EP hit calculation and three-layer defense - Auto-combat/farming mode - Item system with stacking support - Skill system with levels, milestones, and parent skill sync - Shop system with dynamic pricing - Inventory management with bulk selling - Event system - Game loop with offline earnings - Save/Load system Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
27
tests/setup.js
Normal file
27
tests/setup.js
Normal file
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* Vitest 测试环境配置
|
||||
*/
|
||||
|
||||
import { vi } from 'vitest'
|
||||
import { config } from '@vue/test-utils'
|
||||
|
||||
// Mock uni API
|
||||
global.uni = {
|
||||
setStorageSync: vi.fn(() => true),
|
||||
getStorageSync: vi.fn(() => null),
|
||||
removeStorageSync: vi.fn(() => true),
|
||||
getSystemInfoSync: vi.fn(() => ({
|
||||
platform: 'h5',
|
||||
system: 'test'
|
||||
}))
|
||||
}
|
||||
|
||||
// Vue Test Utils 全局配置
|
||||
config.global.stubs = {
|
||||
transition: false,
|
||||
'transition-group': false
|
||||
}
|
||||
|
||||
config.global.mocks = {
|
||||
$t: (key) => key
|
||||
}
|
||||
Reference in New Issue
Block a user