handlebars-lang / handlebars.js

Minimal templating on steroids.
http://handlebarsjs.com
MIT License
17.82k stars 2.04k forks source link

simply added double quote to partial not found error message ##1450 #1954

Closed smmhatami closed 10 months ago

smmhatami commented 1 year ago

simply added double quote to partial not found error message :)

jaylinski commented 11 months ago

Tests are still failing:


  1) partials
       failing dynamic partials:

      AssertionError: TemplateDudes: {{#dudes}}{{> (partial)}}{{/dudes}} does not evaluate to expected output: expected [Function] to throw error including 'The partial missing could not be found' but got 'The partial "missing" could not be found'
      + expected - actual

      -The partial "missing" could not be found
      +The partial missing could not be found

      at HandlebarsTestBench.toThrow (spec\env\common.js:214:14)
      at Context.<anonymous> (spec\partials.js:67:8)

  2) partials
       rendering undefined partial throws an exception:

      Template{{> whatever}} does not evaluate to expected output
      + expected - actual

      -The partial "whatever" could not be found
      +The partial whatever could not be found

      at HandlebarsTestBench.toThrow (spec\env\common.js:214:14)
      at Context.<anonymous> (spec\partials.js:157:38)

  3) partials
       rendering template partial in vm mode throws an exception:

      Template{{> whatever}} does not evaluate to expected output
      + expected - actual

      -The partial "whatever" could not be found
      +The partial whatever could not be found

      at HandlebarsTestBench.toThrow (spec\env\common.js:214:14)
      at Context.<anonymous> (spec\partials.js:175:38)

  4) partials
       inline partials
         should define inline partials for block:
     AssertionError: Template{{#with .}}{{#*inline "myPartial"}}success{{/inline}}{{/with}}{{> myPartial}} does not evaluate to expected output: expected [Function] to throw error matching /myPartial could not/ but got 'The partial "myPartial" could not be found'
      at HandlebarsTestBench.toThrow (spec\env\common.js:214:14)
      at Context.<anonymous> (spec\partials.js:475:9)

Can you fix them? If you don't know how, just let me know, I'll fix them myself.

jaylinski commented 10 months ago

Note: won't be backported to 4.x, because someone may rely on this specific error message not containing quotes.