Front end of the Slack clone application.

12345678910111213141516
  1. var falafel = require('../');
  2. var test = require('tape');
  3. test('generators', function (t) {
  4. t.plan(1);
  5. var src = 'console.log((function * () { yield 3 })().next().value)';
  6. var output = falafel(src, { ecmaVersion: 6 }, function (node) {
  7. if (node.type === 'Literal') {
  8. node.update('555');
  9. }
  10. });
  11. Function(['console'],output)({log:log});
  12. function log (n) { t.equal(n, 555) }
  13. });