@@ -86,7 +86,7 @@ tap.test('parameter hunter parses parameters with unquoted keys and unquoted val
8686 //act
8787 parameter_hunter . find_parameters ( testPattern , pl ) . then ( ( ) => {
8888 //assert
89- test . equals ( util . sanitized ( testPattern . extendedTemplate ) , util . sanitized ( '<h1></h1><p>true</p>' ) ) ;
89+ test . equals ( util . sanitized ( testPattern . extendedTemplate ) , util . sanitized ( '<h1>{{foo}} </h1><p>true</p>' ) ) ;
9090 test . end ( ) ;
9191 } ) ;
9292 } ) ;
@@ -173,7 +173,7 @@ tap.test('parameter hunter parses parameters with single-quoted keys and single-
173173 //act
174174 parameter_hunter . find_parameters ( testPattern , pl ) . then ( ( ) => {
175175 //assert
176- test . equals ( util . sanitized ( testPattern . extendedTemplate ) , util . sanitized ( ' <h1>{{foo}}</h1><p>true not,' true' </p>' ) ) ;
176+ test . equals ( util . sanitized ( testPattern . extendedTemplate ) , util . sanitized ( ` <h1>{{foo}}</h1><p>true not,' true' </p>` ) ) ;
177177 test . end ( ) ;
178178 } ) ;
179179 } ) ;
@@ -201,7 +201,7 @@ tap.test('parameter hunter parses parameters with single-quoted keys and double-
201201 //act
202202 parameter_hunter . find_parameters ( testPattern , pl ) . then ( ( ) => {
203203 //assert
204- test . equals ( util . sanitized ( testPattern . extendedTemplate ) , util . sanitized ( ' <h1>{{foo}}</h1><p>true not:' true' </p>' ) ) ;
204+ test . equals ( util . sanitized ( testPattern . extendedTemplate ) , util . sanitized ( ` <h1>{{foo}}</h1><p>true not:' true' </p>` ) ) ;
205205 test . end ( ) ;
206206 } ) ;
207207 } ) ;
@@ -257,7 +257,7 @@ tap.test('parameter hunter parses parameters with double-quoted keys and single-
257257 //act
258258 parameter_hunter . find_parameters ( testPattern , pl ) . then ( ( ) => {
259259 //assert
260- test . equals ( util . sanitized ( testPattern . extendedTemplate ) , util . sanitized ( '<h1>{{foo}}</h1><p>true not{" true" </p>' ) ) ;
260+ test . equals ( util . sanitized ( testPattern . extendedTemplate ) , util . sanitized ( '<h1>{{foo}}</h1><p>true not{" true" </p>' ) ) ;
261261 test . end ( ) ;
262262 } ) ;
263263 } ) ;
@@ -286,7 +286,7 @@ tap.test('parameter hunter parses parameters with double-quoted keys and double-
286286 //act
287287 parameter_hunter . find_parameters ( testPattern , pl ) . then ( ( ) => {
288288 //assert
289- test . equals ( util . sanitized ( testPattern . extendedTemplate ) , util . sanitized ( '<h1>{{foo}}</h1><p>true not}" true" </p>' ) ) ;
289+ test . equals ( util . sanitized ( testPattern . extendedTemplate ) , util . sanitized ( '<h1>{{foo}}</h1><p>true not}" true" </p>' ) ) ;
290290 test . end ( ) ;
291291 } ) ;
292292 } ) ;
@@ -378,67 +378,3 @@ tap.test('parameter hunter skips malformed parameters', function (test) {
378378 } ) ;
379379 } ) ;
380380} ) ;
381-
382- // From issue #145 https://github.com/pattern-lab/patternlab-node/issues/145
383- tap . only ( 'parameter hunter parses parameters containing html tags' , function ( test ) {
384-
385- const pl = util . fakePatternLab ( testPatternsPath ) ;
386-
387- var commentPath = path . join ( '00-test' , 'comment.mustache' ) ;
388- var commentPattern = loadPattern ( commentPath , pl ) ;
389-
390- var testPatternPath = path . join ( '00-test' , 'sticky-comment.mustache' ) ;
391- var testPattern = loadPattern ( testPatternPath , pl ) ;
392-
393- //override the commentTemplate - i dont really want to create another file
394- pl . patterns [ 0 ] . template = "<p>{{{ tag1 }}}</p><p>{{{ tag2 }}}</p><p>{{{ tag3 }}}</p>" ;
395- pl . patterns [ 0 ] . extendedTemplate = pl . patterns [ 0 ] . template ;
396-
397- //override the file
398- testPattern . template = "{{> test-comment(tag1: '<strong>Single-quoted</strong>', tag2: \"<em>Double-quoted</em>\", tag3: '<strong class=\\\"foo\\\" id=\\\'bar\\\'>With attributes</strong>') }}" ;
399- testPattern . extendedTemplate = testPattern . template ;
400- testPattern . parameteredPartials [ 0 ] = testPattern . template ;
401-
402- var p1 = processIterative ( commentPattern , pl ) ;
403- var p2 = processIterative ( testPattern , pl ) ;
404-
405- Promise . all ( [ p1 , p2 ] ) . then ( ( ) => {
406- //act
407- parameter_hunter . find_parameters ( testPattern , pl ) . then ( ( ) => {
408- //assert
409- test . equals ( util . sanitized ( testPattern . extendedTemplate ) , util . sanitized ( '<p><strong>Single-quoted</strong></p><p><em>Double-quoted</em></p><p><strong class="foo" id=\'bar\'>With attributes</strong></p>' ) ) ;
410- test . end ( ) ;
411- } ) ;
412- } ) ;
413- } ) ;
414-
415- tap . only ( 'parameter hunter expands links inside parameters' , function ( test ) {
416- const pl = util . fakePatternLab ( testPatternsPath ) ;
417-
418- var commentPath = path . join ( '00-test' , 'comment.mustache' ) ;
419- var commentPattern = loadPattern ( commentPath , pl ) ;
420-
421- var testPatternPath = path . join ( '00-test' , 'sticky-comment.mustache' ) ;
422- var testPattern = loadPattern ( testPatternPath , pl ) ;
423-
424- //override the commentTemplate - i dont really want to create another file
425- pl . patterns [ 0 ] . template = '<a href="{{{ url }}}">{{ description }}</a>' ;
426- pl . patterns [ 0 ] . extendedTemplate = pl . patterns [ 0 ] . template ;
427-
428- //override the file
429- testPattern . template = "{{> test-comment(url: 'link.test-comment', description: 'Link to single comment') }}" ;
430- testPattern . extendedTemplate = testPattern . template ;
431- testPattern . parameteredPartials [ 0 ] = testPattern . template ;
432-
433- var p1 = processIterative ( commentPattern , pl ) ;
434- var p2 = processIterative ( testPattern , pl ) ;
435-
436- Promise . all ( [ p1 , p2 ] ) . then ( ( ) => {
437- //act
438- parameter_hunter . find_parameters ( testPattern , pl ) . then ( ( ) => {
439- //assert
440- test . equals ( util . sanitized ( testPattern . extendedTemplate ) , util . sanitized ( '<a href="/patterns/00-test-comment/00-test-comment.rendered.html">Link to single comment</a>' ) ) ;
441- test . end ( ) ;
442- } ) ;
443- } ) ;
444- } ) ;
0 commit comments