mirror of
https://github.com/VickScarlet/lifeRestart.git
synced 2026-08-30 18:36:09 +08:00
update: state, event, condition, data.event.types
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { expect, test, describe } from 'bun:test'
|
||||
import { checkCondition } from '.'
|
||||
import { check } from '.'
|
||||
|
||||
// 定义属性 mock 字典的类型契约
|
||||
interface MockProperties {
|
||||
@@ -10,12 +10,7 @@ interface MockProperties {
|
||||
* 属性注入高阶函数:模拟角色属性管理类
|
||||
*/
|
||||
function withProp(prop: MockProperties) {
|
||||
const p = {
|
||||
get(key: string): any {
|
||||
return prop[key]
|
||||
},
|
||||
}
|
||||
return (condition: string): boolean => checkCondition(p, condition)
|
||||
return (condition: string): boolean => check(prop, condition)
|
||||
}
|
||||
|
||||
describe('condition', () => {
|
||||
|
||||
Reference in New Issue
Block a user