File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -50,14 +50,17 @@ describe('DatatipAdapter', () => {
50
50
expect ( datatip . range . end . row ) . equal ( 0 ) ;
51
51
expect ( datatip . range . end . column ) . equal ( 2 ) ;
52
52
53
- expect ( datatip . markedStrings ) . to . have . lengthOf ( 2 ) ;
54
- expect ( datatip . markedStrings [ 0 ] ) . eql ( { type : 'markdown' , value : 'test' } ) ;
53
+ if ( "markedStrings" in datatip ) {
54
+ expect ( datatip . markedStrings ) . to . have . lengthOf ( 2 ) ;
55
+ expect ( datatip . markedStrings [ 0 ] ) . eql ( { type : 'markdown' , value : 'test' } ) ;
55
56
56
- const snippet = datatip . markedStrings [ 1 ] ;
57
- expect ( snippet . type ) . equal ( 'snippet' ) ;
58
- invariant ( snippet . type === 'snippet' ) ;
59
- expect ( ( snippet as any ) . grammar . scopeName ) . equal ( 'text.plain.null-grammar' ) ;
60
- expect ( snippet . value ) . equal ( 'test snippet' ) ;
57
+ const snippet = datatip . markedStrings [ 1 ] ;
58
+ expect ( snippet . type ) . equal ( 'snippet' ) ;
59
+ invariant ( snippet . type === 'snippet' ) ;
60
+ expect ( ( snippet as any ) . grammar . scopeName ) . equal ( 'text.plain.null-grammar' ) ;
61
+ expect ( snippet . value ) . equal ( 'test snippet' ) ;
62
+ }
63
+ // else the React variant
61
64
62
65
expect ( grammarSpy . calledWith ( 'source.testlang' ) ) . to . be . true ;
63
66
}
You can’t perform that action at this time.
0 commit comments