このコミットが含まれているのは:
2026-05-13 20:42:25 +09:00
コミット 0a13c00f37
48個のファイルの変更2378行の追加7行の削除
+23
ファイルの表示
@@ -0,0 +1,23 @@
import { describe, expect, it } from 'vitest'
import { useSharedTransitionStore } from '@/stores/sharedTransitionStore'
describe ('useSharedTransitionStore', () => {
it ('sets and clears shared ids per location key', () => {
useSharedTransitionStore.setState ({ byLocationKey: {} })
useSharedTransitionStore.getState ().setForLocationKey ('loc-1', 'page-1')
useSharedTransitionStore.getState ().setForLocationKey ('loc-2', 'page-2')
expect (useSharedTransitionStore.getState ().byLocationKey).toEqual ({
'loc-1': 'page-1',
'loc-2': 'page-2',
})
useSharedTransitionStore.getState ().clearForLocationKey ('loc-1')
expect (useSharedTransitionStore.getState ().byLocationKey).toEqual ({
'loc-2': 'page-2',
})
})
})