Files
framework/public/plugins/mustache/test/module-systems/esm-test-exports.mjs
T
2023-01-24 20:31:23 +00:00

13 lines
212 B
JavaScript

import assert from 'assert';
import mustache from 'mustache';
const view = {
title: 'Joe',
calc: () => 2 + 4
};
assert.strictEqual(
mustache.render('{{title}} spends {{calc}}', view),
'Joe spends 6'
);