Add a test for testing constructors

This commit is contained in:
Manuel Thalmann
2018-06-18 23:41:16 +02:00
parent af5e425dff
commit e8ed3007de
+15
View File
@@ -12,3 +12,18 @@ var output2 = Mustache.render(template2, view2);
var view3 = { firstName: "John", lastName: "Smith", blogURL: "http://testblog.com" };
var template3 = "<h1>{{firstName}} {{lastName}}</h1>Blog: {{blogURL}}";
var html = Mustache.to_html(template3, view3);
var view4 = new class extends Mustache.Context
{
constructor()
{
super({});
}
public lookup(name: string)
{
return name.toUpperCase();
}
};
var template4 = "Hello, {{firstName}} {{lastName}}";
var html4 = Mustache.render(template4, view4);