mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-28 18:22:40 +00:00
[Type] Enable strict schema type for setting entries (#3425)
This commit is contained in:
@@ -189,11 +189,11 @@ describe('useSettingStore', () => {
|
||||
expect(storedValue).toEqual({ foo: 'bar', nested: { value: 123 } })
|
||||
})
|
||||
|
||||
it('should prevent mutations of retrieved objects', () => {
|
||||
it('should prevent mutations of retrieved objects', async () => {
|
||||
const initialValue = { foo: 'bar', nested: { value: 123 } }
|
||||
|
||||
// Set initial value
|
||||
store.set('test.setting', initialValue)
|
||||
await store.set('test.setting', initialValue)
|
||||
|
||||
// Get the value and try to mutate it
|
||||
const retrievedValue = store.get('test.setting')
|
||||
@@ -230,11 +230,11 @@ describe('useSettingStore', () => {
|
||||
expect(storedValue).toEqual([1, 2, { value: 3 }])
|
||||
})
|
||||
|
||||
it('should prevent mutations of retrieved arrays', () => {
|
||||
it('should prevent mutations of retrieved arrays', async () => {
|
||||
const initialArray = [1, 2, { value: 3 }]
|
||||
|
||||
// Set initial value
|
||||
store.set('test.setting', initialArray)
|
||||
await store.set('test.setting', initialArray)
|
||||
|
||||
// Get the value and try to mutate it
|
||||
const retrievedArray = store.get('test.setting')
|
||||
|
||||
Reference in New Issue
Block a user