We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
it('can combine inline command and block async command', function () { var tpl = '{{#async(1)}}{{upperCase(asyncContent)}}{{/async}}'; var ret = ''; expect(new XTemplate(tpl, { commands: { async: function (scope, option, buffer) { var newScope = new this.Scope(); newScope.setParent(scope); return buffer.async(function (asyncBuffer) { setTimeout(function () { newScope.setData({ asyncContent: option.params[0] + ' ok' }); option.fn(newScope, asyncBuffer).end(); }, 100); }); }, 'upperCase': function (scope, option) { return option.params[0].toUpperCase(); } } }).render({ }, function (error, content) { ret = content; })).toBe(''); waitsFor(function () { return ret; }); runs(function () { expect(ret).toBe('1 OK'); }); });
The text was updated successfully, but these errors were encountered:
13b7257
No branches or pull requests
The text was updated successfully, but these errors were encountered: