@@ -4,7 +4,6 @@ var Observer = ob.Observer
44var observe = ob . observe
55var Dep = require ( 'src/observer/dep' )
66var _ = require ( 'src/util' )
7- var config = require ( 'src/config' )
87
98describe ( 'Observer' , function ( ) {
109 beforeEach ( function ( ) {
@@ -59,9 +58,6 @@ describe('Observer', function () {
5958 } )
6059
6160 it ( 'create on already observed object' , function ( ) {
62- var previousConvertAllProperties = config . convertAllProperties
63- config . convertAllProperties = true
64-
6561 // on object
6662 var obj = { }
6763 var val = 0
@@ -97,14 +93,9 @@ describe('Observer', function () {
9793 // should call underlying setter
9894 obj . a = 10
9995 expect ( val ) . toBe ( 10 )
100-
101- config . convertAllProperties = previousConvertAllProperties
10296 } )
10397
10498 it ( 'create on property with only getter' , function ( ) {
105- var previousConvertAllProperties = config . convertAllProperties
106- config . convertAllProperties = true
107-
10899 // on object
109100 var obj = { }
110101 Object . defineProperty ( obj , 'a' , {
@@ -134,14 +125,9 @@ describe('Observer', function () {
134125 obj . a = 101
135126 } catch ( e ) { }
136127 expect ( obj . a ) . toBe ( 123 )
137-
138- config . convertAllProperties = previousConvertAllProperties
139128 } )
140129
141130 it ( 'create on property with only setter' , function ( ) {
142- var previousConvertAllProperties = config . convertAllProperties
143- config . convertAllProperties = true
144-
145131 // on object
146132 var obj = { }
147133 var val = 10
@@ -168,8 +154,6 @@ describe('Observer', function () {
168154 // writes should call the set function
169155 obj . a = 100
170156 expect ( val ) . toBe ( 100 )
171-
172- config . convertAllProperties = previousConvertAllProperties
173157 } )
174158
175159 it ( 'create on property which is marked not configurable' , function ( ) {
@@ -232,9 +216,6 @@ describe('Observer', function () {
232216 } )
233217
234218 it ( 'observing object prop change on defined property' , function ( ) {
235- var previousConvertAllProperties = config . convertAllProperties
236- config . convertAllProperties = true
237-
238219 var obj = { val : 2 }
239220 Object . defineProperty ( obj , 'a' , {
240221 configurable : true ,
@@ -266,8 +247,6 @@ describe('Observer', function () {
266247 expect ( obj . val ) . toBe ( 3 ) // make sure 'setter' was called
267248 obj . val = 5
268249 expect ( obj . a ) . toBe ( 5 ) // make sure 'getter' was called
269-
270- config . convertAllProperties = previousConvertAllProperties
271250 } )
272251
273252 it ( 'observing set/delete' , function ( ) {
0 commit comments