mirror of
https://github.com/VickScarlet/lifeRestart.git
synced 2026-08-29 18:14:41 +08:00
update: hooks, web
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { expect, test, describe } from 'bun:test'
|
||||
import { createState } from './state'
|
||||
import { trigger } from './achievement'
|
||||
import { AchievementOpportunity } from '@remake/data'
|
||||
import { enableMapSet } from 'immer'
|
||||
enableMapSet()
|
||||
|
||||
@@ -20,7 +21,11 @@ describe('Achievement', () => {
|
||||
|
||||
test('trigger [times:500]', () => {
|
||||
const p = { ...profile, times: 500 }
|
||||
const result = trigger('END', createState(allocation, []), p)
|
||||
const result = trigger(
|
||||
AchievementOpportunity.End,
|
||||
createState(allocation, []),
|
||||
p,
|
||||
)
|
||||
expect(result.state.achievements).toContain(101) // 既视感
|
||||
expect(result.state.achievements).toContain(102) // 孟婆愁
|
||||
expect(result.state.achievements).toContain(103) // 所有人都是我
|
||||
|
||||
Reference in New Issue
Block a user