Test case details

Preparation Code

<script src="//yui.yahooapis.com/3.3.0/build/yui/yui.js"></script> <script>   Y = YUI({    modules: {     'gallery-mustache': {      fullpath: 'https://github.com/derek/yui3-gallery/raw/master/build/gallery-mustache/gallery-mustache.js'     }    }   }).use('gallery-mustache', 'substitute');       var templateA = "Hello {{world}}, Hello {{world}}, Hello {{world}}";   var viewA = {    world: "World"   }     var templateB = "{{title}} spends {{calc}}";   var viewB = {    title: "Joe",    calc: function() {     return 2 + 4;    }   } </script>

Test cases

Test #1

Y.mustache(templateA, viewA);

Test #2

Y.substitute(templateA, viewA);

Test #3

Y.mustache(templateB, viewB);

Test #4

Y.substitute(templateB, viewB);