@@ -227,5 +227,60 @@ describe('Errors', () => {
227227 assert . strictEqual ( errorResponse . body . length , 0 ) ;
228228 } ) ;
229229 } ) ;
230+
231+ it ( 'should not return an error for a placeholder that spans multiple lines (#44)' , ( ) => {
232+ const server = createServer ( ) ;
233+ openMockFile ( server , mockFileName , `let css: any = {}; const q = css.a\`
234+ color:
235+ $\{'transparent'};
236+ border-bottom: 1px;
237+ &:hover {
238+ color: inherit;
239+ text-decoration: none;
240+ }
241+ }
242+ \`` )
243+ server . send ( { command : 'semanticDiagnosticsSync' , arguments : { file : mockFileName } } ) ;
244+
245+ return server . close ( ) . then ( ( ) => {
246+ const errorResponse = getFirstResponseOfType ( 'semanticDiagnosticsSync' , server ) ;
247+ assert . isTrue ( errorResponse . success ) ;
248+ assert . strictEqual ( errorResponse . body . length , 0 ) ;
249+ } ) ;
250+ } ) ;
251+
252+
253+ it ( 'should not return an error for complicated style (#44)' , ( ) => {
254+ const server = createServer ( ) ;
255+ openMockFile ( server , mockFileName , `let css: any = {}; const q = css.a\`
256+ display: flex;
257+ width: 6rem;
258+ height: 5rem;
259+ margin-right: -3px;
260+ border-right: 3px solid
261+ $\{({ active, theme: { colors } }) =>
262+ active ? colors.yellow : 'transparent'};
263+ border-bottom: 1px solid rgba(255, 255, 255, 0.5);
264+ font-weight: bold;
265+ font-size: 0.875rem;
266+ color: white;
267+ cursor: pointer;
268+ &:not([href]):not([tabindex]) {
269+ color: white;
270+ }
271+ &:hover {
272+ color: inherit;
273+ text-decoration: none;
274+ }
275+ \`` )
276+ server . send ( { command : 'semanticDiagnosticsSync' , arguments : { file : mockFileName } } ) ;
277+
278+ return server . close ( ) . then ( ( ) => {
279+ const errorResponse = getFirstResponseOfType ( 'semanticDiagnosticsSync' , server ) ;
280+ assert . isTrue ( errorResponse . success ) ;
281+ assert . strictEqual ( errorResponse . body . length , 0 ) ;
282+ } ) ;
283+ } ) ;
284+
230285} ) ;
231286
0 commit comments