11import { of , asyncScheduler , Observable , scheduled , ObservableInput } from 'rxjs' ;
2- import { observable } from 'rxjs/internal/symbol/observable' ;
32import { iterator } from 'rxjs/internal/symbol/iterator' ;
43
54if ( process && process . on ) {
@@ -9,7 +8,7 @@ if (process && process.on) {
98 * it handles the rejected promise where it does not notice
109 * that the test failed.
1110 */
12- process . on ( 'unhandledRejection' , err => {
11+ process . on ( 'unhandledRejection' , ( err ) => {
1312 console . error ( err ) ;
1413 process . exit ( 1 ) ;
1514 } ) ;
@@ -18,45 +17,45 @@ if (process && process.on) {
1817export function lowerCaseO < T > ( ...args : Array < any > ) : Observable < T > {
1918 const o : any = {
2019 subscribe ( observer : any ) {
21- args . forEach ( v => observer . next ( v ) ) ;
20+ args . forEach ( ( v ) => observer . next ( v ) ) ;
2221 observer . complete ( ) ;
2322 return {
24- unsubscribe ( ) { /* do nothing */ }
23+ unsubscribe ( ) {
24+ /* do nothing */
25+ } ,
2526 } ;
26- }
27+ } ,
2728 } ;
2829
29- o [ observable ] = function ( this : any ) {
30+ o [ Symbol . observable ?? '@@observable' ] = function ( this : any ) {
3031 return this ;
3132 } ;
3233
3334 return < any > o ;
3435}
3536
36- export const createObservableInputs = < T > ( value : T ) => of (
37- of ( value ) ,
38- scheduled ( [ value ] , asyncScheduler ) ,
39- [ value ] ,
40- Promise . resolve ( value ) ,
41- {
42- [ iterator ] : ( ) => {
43- const iteratorResults = [
44- { value, done : false } ,
45- { done : true }
46- ] ;
47- return {
48- next : ( ) => {
49- return iteratorResults . shift ( ) ;
50- }
51- } ;
52- }
53- } as any as Iterable < T > ,
54- {
55- [ observable ] : ( ) => of ( value )
56- } as any
57- ) as Observable < ObservableInput < T > > ;
37+ export const createObservableInputs = < T > ( value : T ) =>
38+ of (
39+ of ( value ) ,
40+ scheduled ( [ value ] , asyncScheduler ) ,
41+ [ value ] ,
42+ Promise . resolve ( value ) ,
43+ {
44+ [ iterator ] : ( ) => {
45+ const iteratorResults = [ { value, done : false } , { done : true } ] ;
46+ return {
47+ next : ( ) => {
48+ return iteratorResults . shift ( ) ;
49+ } ,
50+ } ;
51+ } ,
52+ } as any as Iterable < T > ,
53+ {
54+ [ Symbol . observable ?? '@@observable' ] : ( ) => of ( value ) ,
55+ } as any
56+ ) as Observable < ObservableInput < T > > ;
5857
5958/**
6059 * Used to signify no subscriptions took place to `expectSubscriptions` assertions.
6160 */
62- export const NO_SUBS : string [ ] = [ ] ;
61+ export const NO_SUBS : string [ ] = [ ] ;
0 commit comments