File tree Expand file tree Collapse file tree 4 files changed +14
-2
lines changed
test/library-tests/Promises Expand file tree Collapse file tree 4 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -9,4 +9,5 @@ lgtm,codescanning
9
9
[ native-promise-only] ( https://npmjs.com/package/native-promise-only ) ,
10
10
[ when] ( https://npmjs.com/package/when ) ,
11
11
[ pinkie-promise] ( https://npmjs.com/package/pinkie-promise ) ,
12
- [ pinkie] ( https://npmjs.com/package/pinkie )
12
+ [ pinkie] ( https://npmjs.com/package/pinkie ) ,
13
+ [ synchronous-promise] ( https://npmjs.com/package/synchronous-promise )
Original file line number Diff line number Diff line change @@ -87,6 +87,8 @@ private DataFlow::SourceNode getAPromiseObject() {
87
87
result = DataFlow:: moduleImport ( "pinkie-promise" )
88
88
or
89
89
result = DataFlow:: moduleImport ( "pinkie" )
90
+ or
91
+ result = DataFlow:: moduleMember ( "synchronous-promise" , "SynchronousPromise" )
90
92
}
91
93
92
94
/**
Original file line number Diff line number Diff line change 135
135
new Promise ( function ( resolve , reject ) {
136
136
resolve ( data ) ;
137
137
} ) ;
138
- } ) ( ) ;
138
+ } ) ( ) ;
139
+
140
+ ( function ( ) {
141
+ import { SynchronousPromise } from 'synchronous-promise' ;
142
+ // is technically not a promise, but behaves like one.
143
+ var promise = SynchronousPromise . resolve ( source ) ;
144
+ } ) ( ) ;
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ test_ResolvedPromiseDefinition
43
43
| promises.js:114:3:114:25 | Promise ... source) | promises.js:114:19:114:24 | source |
44
44
| promises.js:119:3:119:25 | Promise ... source) | promises.js:119:19:119:24 | source |
45
45
| promises.js:125:20:125:39 | when.resolve(source) | promises.js:125:33:125:38 | source |
46
+ | promises.js:143:17:143:50 | Synchro ... source) | promises.js:143:44:143:49 | source |
46
47
test_PromiseDefinition_getARejectHandler
47
48
| flow.js:26:2:26:49 | new Pro ... ource)) | flow.js:26:69:26:80 | y => sink(y) |
48
49
| flow.js:32:2:32:49 | new Pro ... ource)) | flow.js:32:57:32:68 | x => sink(x) |
@@ -442,3 +443,5 @@ typetrack
442
443
| promises.js:125:20:125:39 | when.resolve(source) | promises.js:125:33:125:38 | source | store $PromiseResolveField$ |
443
444
| promises.js:135:3:137:4 | new Pro ... );\\n }) | promises.js:136:13:136:16 | data | copy $PromiseResolveField$ |
444
445
| promises.js:135:3:137:4 | new Pro ... );\\n }) | promises.js:136:13:136:16 | data | store $PromiseResolveField$ |
446
+ | promises.js:143:17:143:50 | Synchro ... source) | promises.js:143:44:143:49 | source | copy $PromiseResolveField$ |
447
+ | promises.js:143:17:143:50 | Synchro ... source) | promises.js:143:44:143:49 | source | store $PromiseResolveField$ |
You can’t perform that action at this time.
0 commit comments