File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
packages/reactivity/__tests__ Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -850,7 +850,7 @@ describe('reactivity/effect', () => {
850
850
expect ( dummy ) . toBe ( 1 )
851
851
} )
852
852
853
- it ( 'should not be trigger when the value and the old value both are NaN' , ( ) => {
853
+ it ( 'should not be triggered when the value and the old value both are NaN' , ( ) => {
854
854
const obj = reactive ( {
855
855
foo : NaN
856
856
} )
@@ -884,13 +884,14 @@ describe('reactivity/effect', () => {
884
884
expect ( record ) . toBeUndefined ( )
885
885
} )
886
886
887
- it ( 'should trigger once effect when set the equal proxy' , ( ) => {
887
+ it ( 'should not be triggered when set with the same proxy' , ( ) => {
888
888
const obj = reactive ( { foo : 1 } )
889
889
const observed : any = reactive ( { obj } )
890
890
const fnSpy = jest . fn ( ( ) => observed . obj )
891
891
892
892
effect ( fnSpy )
893
893
894
+ expect ( fnSpy ) . toHaveBeenCalledTimes ( 1 )
894
895
observed . obj = obj
895
896
expect ( fnSpy ) . toHaveBeenCalledTimes ( 1 )
896
897
@@ -900,6 +901,7 @@ describe('reactivity/effect', () => {
900
901
901
902
effect ( fnSpy2 )
902
903
904
+ expect ( fnSpy2 ) . toHaveBeenCalledTimes ( 1 )
903
905
observed2 . obj2 = obj2
904
906
expect ( fnSpy2 ) . toHaveBeenCalledTimes ( 1 )
905
907
} )
You can’t perform that action at this time.
0 commit comments