@@ -70,7 +70,7 @@ describe('synchronous-inspection-tests', function () {
70
70
setTimeout ( function ( ) {
71
71
assert ( fulfilledPromise . isFulfilled ( ) ) ;
72
72
assert ( ! fulfilledPromise . isRejected ( ) ) ;
73
- assert ( fulfilledPromise . value ( ) ) ;
73
+ assert ( fulfilledPromise . getValue ( ) ) ;
74
74
assert ( ! fulfilledPromise . isPending ( ) ) ;
75
75
} , 30 ) ;
76
76
} ) ;
@@ -102,7 +102,7 @@ describe('synchronous-inspection-tests', function () {
102
102
setTimeout ( function ( ) {
103
103
assert ( ! fulfilledPromise . isFulfilled ( ) ) ;
104
104
assert ( fulfilledPromise . isRejected ( ) ) ;
105
- assert ( ! fulfilledPromise . reason ( ) ) ;
105
+ assert ( ! fulfilledPromise . getReason ( ) ) ;
106
106
assert ( ! fulfilledPromise . isPending ( ) ) ;
107
107
} , 30 ) ;
108
108
} ) ;
@@ -130,7 +130,7 @@ describe('synchronous-inspection-tests', function () {
130
130
assert ( ! fulfilledPromise . isRejected ( ) ) ;
131
131
132
132
try {
133
- fulfilledPromise . value ( ) ;
133
+ fulfilledPromise . getValue ( ) ;
134
134
135
135
assert ( false ) ;
136
136
}
@@ -142,7 +142,7 @@ describe('synchronous-inspection-tests', function () {
142
142
143
143
setTimeout ( function ( ) {
144
144
try {
145
- fulfilledPromise . value ( ) ;
145
+ fulfilledPromise . getValue ( ) ;
146
146
147
147
assert ( false ) ;
148
148
}
@@ -175,7 +175,7 @@ describe('synchronous-inspection-tests', function () {
175
175
assert ( ! fulfilledPromise . isRejected ( ) ) ;
176
176
177
177
try {
178
- fulfilledPromise . reason ( ) ;
178
+ fulfilledPromise . getReason ( ) ;
179
179
180
180
assert ( false ) ;
181
181
}
@@ -187,7 +187,7 @@ describe('synchronous-inspection-tests', function () {
187
187
188
188
setTimeout ( function ( ) {
189
189
try {
190
- fulfilledPromise . reason ( ) ;
190
+ fulfilledPromise . getReason ( ) ;
191
191
192
192
assert ( false ) ;
193
193
}
@@ -196,4 +196,12 @@ describe('synchronous-inspection-tests', function () {
196
196
}
197
197
} , 30 ) ;
198
198
} ) ;
199
+
200
+ it ( 'can disable synchronous inspection' , function ( ) {
201
+ Promise . enableSynchronous ( ) ;
202
+ var testPromise = Promise . resolve ( 'someValue' ) ;
203
+ assert ( testPromise . getValue ( ) == 'someValue' ) ;
204
+ Promise . disableSynchronous ( ) ;
205
+ assert ( testPromise . getValue == undefined ) ;
206
+ } ) ;
199
207
} ) ;
0 commit comments