@@ -70,7 +70,7 @@ describe('synchronous-inspection-tests', function () {
7070 setTimeout ( function ( ) {
7171 assert ( fulfilledPromise . isFulfilled ( ) ) ;
7272 assert ( ! fulfilledPromise . isRejected ( ) ) ;
73- assert ( fulfilledPromise . value ( ) ) ;
73+ assert ( fulfilledPromise . getValue ( ) ) ;
7474 assert ( ! fulfilledPromise . isPending ( ) ) ;
7575 } , 30 ) ;
7676 } ) ;
@@ -102,7 +102,7 @@ describe('synchronous-inspection-tests', function () {
102102 setTimeout ( function ( ) {
103103 assert ( ! fulfilledPromise . isFulfilled ( ) ) ;
104104 assert ( fulfilledPromise . isRejected ( ) ) ;
105- assert ( ! fulfilledPromise . reason ( ) ) ;
105+ assert ( ! fulfilledPromise . getReason ( ) ) ;
106106 assert ( ! fulfilledPromise . isPending ( ) ) ;
107107 } , 30 ) ;
108108 } ) ;
@@ -130,7 +130,7 @@ describe('synchronous-inspection-tests', function () {
130130 assert ( ! fulfilledPromise . isRejected ( ) ) ;
131131
132132 try {
133- fulfilledPromise . value ( ) ;
133+ fulfilledPromise . getValue ( ) ;
134134
135135 assert ( false ) ;
136136 }
@@ -142,7 +142,7 @@ describe('synchronous-inspection-tests', function () {
142142
143143 setTimeout ( function ( ) {
144144 try {
145- fulfilledPromise . value ( ) ;
145+ fulfilledPromise . getValue ( ) ;
146146
147147 assert ( false ) ;
148148 }
@@ -175,7 +175,7 @@ describe('synchronous-inspection-tests', function () {
175175 assert ( ! fulfilledPromise . isRejected ( ) ) ;
176176
177177 try {
178- fulfilledPromise . reason ( ) ;
178+ fulfilledPromise . getReason ( ) ;
179179
180180 assert ( false ) ;
181181 }
@@ -187,7 +187,7 @@ describe('synchronous-inspection-tests', function () {
187187
188188 setTimeout ( function ( ) {
189189 try {
190- fulfilledPromise . reason ( ) ;
190+ fulfilledPromise . getReason ( ) ;
191191
192192 assert ( false ) ;
193193 }
@@ -196,4 +196,12 @@ describe('synchronous-inspection-tests', function () {
196196 }
197197 } , 30 ) ;
198198 } ) ;
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+ } ) ;
199207} ) ;
0 commit comments